Added sortable non-online category example.

This commit is contained in:
Brandon Taylor
2014-11-08 08:49:07 -05:00
parent bcd328a101
commit daadd190cb
5 changed files with 26 additions and 1 deletions
+9
View File
@@ -123,6 +123,9 @@ class NonSortableCategory(SimpleModel):
verbose_name = 'Non-Sortable Category'
verbose_name_plural = 'Non-Sortable Categories'
def __unicode__(self):
return self.title
class SortableCategoryWidget(SimpleModel, Sortable):
class Meta(Sortable.Meta):
@@ -131,6 +134,9 @@ class SortableCategoryWidget(SimpleModel, Sortable):
non_sortable_category = SortableForeignKey(NonSortableCategory)
def __unicode__(self):
return self.title
class SortableNonInlineCategory(SimpleModel, Sortable):
"""Example of a model that is sortable, but has a SortableForeignKey
@@ -142,3 +148,6 @@ class SortableNonInlineCategory(SimpleModel, Sortable):
verbose_name_plural = 'Sortable Non-Inline Categories'
non_sortable_category = SortableForeignKey(NonSortableCategory)
def __unicode__(self):
return self.title
Binary file not shown.