Updated example to demonstrate SortableStackedInline
parent
5d10de5ed4
commit
7ad1925ec1
22
README
22
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
|
||||
=============
|
||||
|
|
|
|||
Loading…
Reference in New Issue