Merge pull request #163 from deluge/master

add more notes in readme for different versions
master
Brandon Taylor 2017-02-01 05:43:20 -05:00 committed by GitHub
commit 0e464ca7bb
2 changed files with 56 additions and 1 deletions

View File

@ -485,6 +485,34 @@ with:
<script src="{% static 'adminsortable/js/admin.sortable.tabular.inlines.js' %}"></script>
```
### Notes
From ``django-cms 3.x`` the path of change_form.html has changed. Replace the follwing line:
```html
{% extends "admin/cms/page/plugin_change_form.html" %}
```
with
```html
{% extends "admin/cms/page/plugin/change_form.html" %}
```
From ``django-admin-sortable 2.0.13`` the ``jquery.django-csrf.js`` was removed and you have to include the snippet-template.
Change the following line:
```html
<script type="text/javascript" src="{% static 'adminsortable/js/jquery.django-csrf.js' %}"></script>
```
to
```html
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name='csrftoken' %}
```
Please note, if you change the ``CSRF_COOKIE_NAME`` you have to adjust ``csrf_cookie_name='YOUR_CSRF_COOKIE_NAME'``
### Rationale
Other projects have added drag-and-drop ordering to the ChangeList
view, however this introduces a couple of problems...

View File

@ -53,7 +53,7 @@ Download django-admin-sortable from
`source <https://github.com/iambrandontaylor/django-admin-sortable/archive/master.zip>`__
1. Unzip the directory and cd into the uncompressed project directory
2.
2.
- Optional: Enable your virtualenv
@ -597,6 +597,33 @@ with:
<script src="{% static 'adminsortable/js/admin.sortable.tabular.inlines.js' %}"></script>
Notes
~~~~~
From ``django-cms 3.x`` the path of change_form.html has changed. Replace the follwing line:
.. code:: html
{% extends "admin/cms/page/plugin_change_form.html" %}
with
.. code:: html
{% extends "admin/cms/page/plugin/change_form.html" %}
From ``django-admin-sortable 2.0.13`` the ``jquery.django-csrf.js`` was removed and you have to include the snippet-template.
Change the following line:
.. code:: html
<script type="text/javascript" src="{% static 'adminsortable/js/jquery.django-csrf.js' %}"></script>
to
.. code:: html
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name='csrftoken' %}
Please note, if you change the ``CSRF_COOKIE_NAME`` you have to adjust ``csrf_cookie_name='YOUR_CSRF_COOKIE_NAME'``
Rationale
~~~~~~~~~