Added new model class to demonstrate a sortable model with a foreign key that is not sortable that is not defined as an inline.

master
Brandon Taylor 2014-10-24 20:32:53 -04:00
parent 5eaf0987b9
commit 6ec43fcd76
1 changed files with 6 additions and 2 deletions

View File

@ -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)