From 6ec43fcd76d75870044108deb262b0b7c2008f46 Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Fri, 24 Oct 2014 20:32:53 -0400 Subject: [PATCH] Added new model class to demonstrate a sortable model with a foreign key that is not sortable that is not defined as an inline. --- sample_project/app/models.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sample_project/app/models.py b/sample_project/app/models.py index 4e33a41..eab5e30 100644 --- a/sample_project/app/models.py +++ b/sample_project/app/models.py @@ -133,8 +133,12 @@ class SortableCategoryWidget(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): - verbose_name = 'Sortable Category Widget' - verbose_name_plural = 'Sortable Category Widgets' + verbose_name = 'Sortable Non-Inline Category' + verbose_name_plural = 'Sortable Non-Inline Categories' non_sortable_category = SortableForeignKey(NonSortableCategory)