From 52b9dc693d37b66f932f2e7f8ea91a14b73433fe Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Fri, 3 May 2013 08:52:54 -0400 Subject: [PATCH] Updated version to 1.4.6. Updated README. --- README.md | 36 ++++++++++++++++++++++++++++-------- adminsortable/__init__.py | 2 +- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c78629d..0e6f51e 100644 --- a/README.md +++ b/README.md @@ -177,13 +177,28 @@ may change, and adminsortable won't be able to automatically determine if the inline model is sortable from here, which is why we have to set the `is_sortable` property of the model in this method. +#### Extending custom templates +By default, adminsortable's change form and change list views inherit from +Django admin's standard templates. Sometimes you need to have a custom change +form or change list, but also need adminsortable's CSS and JavaScript for +inline models that are sortable for example. -*** IMPORTANT *** -With stacked inline models, their height can dynamically increase, -which can cause sortable stacked inlines to not behave as expected. -If the height of the stacked inline is going to be very tall, I would -suggest NOT using SortableStackedInline. I'm currently working on -a way to make this more usable. +SortableAdmin has two properties you can override for this use case: + + change_form_template_extends + change_list_template_extends + +These properties have default values of: + + change_form_template_extends = 'admin/change_form.html' + change_list_template_extends = 'admin/change_list.html' + + +#### A Special Note About Stacked Inlines... +The height of a stacked inline model can dynamically increase, +which can make them difficult to sort. If you anticipate the height of a +stacked inline is going to be very tall, I would suggest using +TabularStackedInline instead. ### Rationale @@ -203,8 +218,13 @@ ordering on top of that just seemed a little much in my opinion. django-admin-sortable is currently used in production. -### What's new in 1.4.5.1? -- Fixed unicode support in sort view title. +### What's new in 1.4.6? +- SortableAdmin now allows you to specify a custom template to extend, +rather than using the default admin change list/form templates. This gives +you the ability to have a custom change list/form template that also has +sorting capabilities. +- Fixed a problem with the display of drag-and-drop capability messaging in +inline models that was caused by adminsortable respecting custom querysets. ### Future diff --git a/adminsortable/__init__.py b/adminsortable/__init__.py index 37297d6..e8ddf51 100755 --- a/adminsortable/__init__.py +++ b/adminsortable/__init__.py @@ -1,4 +1,4 @@ -VERSION = (1, 4, 5, 1) # following PEP 386 +VERSION = (1, 4, 6) # following PEP 386 DEV_N = None