From 7ad1925ec18aeb0003afaa886e8316f0d0e3d1fe Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Sat, 3 Sep 2011 22:10:27 -0500 Subject: [PATCH] Updated example to demonstrate SortableStackedInline --- README | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README b/README index 31f1596..a8aee13 100644 --- a/README +++ b/README @@ -94,6 +94,22 @@ SortableTabularInline: """Your inline options go here""" +To enable sorting on StackedInline models, you need to inherit from +SortableStackedInline: + + from adminsortable.admin import SortableStackedInline + + class MySortableStackedInline(SortableStackedInline): + """Your inline options go here""" + +!!! *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. + + Rationale ============= Other projects have added drag-and-drop ordering to the ChangeList @@ -119,16 +135,16 @@ Current - Supports Django 1.3+ - Adds an admin view to any model that inherits from Sortable and SortableAdmin that allows you to drag and drop objects into any order via jQueryUI. -- Adds drag and drop ordering to Tabular Inline models that inherit from -SortableTabularInline +- Adds drag and drop ordering to Tabular and Stacked Inline models that inherit from +SortableTabularInline and SortableStackedInline - Allows ordering of objects that are sorted on a Foreign Key, and adds ordering to the foreign key object if it also inherits from Sortable. Future ------ - Support for foreign keys that are self referential -- Support for StackedInline - Support for ForeignKeys that have not been previously defined +- More unit tests Requirements =============