Added new model class to demonstrate a sortable model with a foreign key that is not sortable that is not defined as an inline.
parent
5eaf0987b9
commit
6ec43fcd76
|
|
@ -133,8 +133,12 @@ class SortableCategoryWidget(SimpleModel, Sortable):
|
||||||
|
|
||||||
|
|
||||||
class SortableNonInlineCategory(SimpleModel, Sortable):
|
class SortableNonInlineCategory(SimpleModel, Sortable):
|
||||||
|
"""Example of a model that is sortable, but has a SortableForeignKey
|
||||||
|
that is *not* sortable, and is also not defined as an inline of the
|
||||||
|
SortableForeignKey field."""
|
||||||
|
|
||||||
class Meta(Sortable.Meta):
|
class Meta(Sortable.Meta):
|
||||||
verbose_name = 'Sortable Category Widget'
|
verbose_name = 'Sortable Non-Inline Category'
|
||||||
verbose_name_plural = 'Sortable Category Widgets'
|
verbose_name_plural = 'Sortable Non-Inline Categories'
|
||||||
|
|
||||||
non_sortable_category = SortableForeignKey(NonSortableCategory)
|
non_sortable_category = SortableForeignKey(NonSortableCategory)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue