From b2ea957c4ab456c94b191c6b85d981ad4c93d1ed Mon Sep 17 00:00:00 2001 From: Benjamin Banduhn Date: Wed, 1 Feb 2017 10:48:39 +0100 Subject: [PATCH] add more notes in readme for different versions --- README.md | 28 ++++++++++++++++++++++++++++ README.rst | 29 ++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e55bbe..038e8d4 100644 --- a/README.md +++ b/README.md @@ -485,6 +485,34 @@ with: ``` +### 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 + +``` + +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... diff --git a/README.rst b/README.rst index 87ff9ee..d8bd45f 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,7 @@ Download django-admin-sortable from `source `__ 1. Unzip the directory and cd into the uncompressed project directory -2. +2. - Optional: Enable your virtualenv @@ -597,6 +597,33 @@ with: +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 + + +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 ~~~~~~~~~