Added legacy model definition back for seamless backwards compatibility.

Updated readme.
Added sample legacy model implementation.
This commit is contained in:
Brandon Taylor
2015-08-24 12:55:56 -04:00
parent 827f5f092e
commit 74a6cadf8d
6 changed files with 43 additions and 21 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION = (1, 8, 5) # following PEP 386
VERSION = (2, 0, 0) # following PEP 386
DEV_N = None
+5 -1
View File
@@ -124,8 +124,12 @@ class SortableMixin(models.Model):
extra_filters, filter_on_sortable_fk)
# for easier legacy support of existing implementations
# for legacy support of existing implementations
class Sortable(SortableMixin):
class Meta:
abstract = True
ordering = ['order']
order = models.PositiveIntegerField(default=0, editable=False,
db_index=True)