Added sortable non-online category example.
This commit is contained in:
@@ -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.
Reference in New Issue
Block a user