mirror of
https://github.com/jazzband/django-admin-sortable.git
synced 2026-03-17 06:20:33 +00:00
Skipped UUID-pk model if Django less than 1.8
This commit is contained in:
parent
bf75b85190
commit
6e6b92d759
1 changed files with 6 additions and 5 deletions
|
|
@ -33,12 +33,13 @@ class TestSortableModel(SortableMixin):
|
|||
return self.title
|
||||
|
||||
|
||||
class TestNonAutoFieldModel(SortableMixin):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
order = models.PositiveIntegerField(editable=False, db_index=True)
|
||||
if VERSION > (1, 8):
|
||||
class TestNonAutoFieldModel(SortableMixin):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
order = models.PositiveIntegerField(editable=False, db_index=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['order']
|
||||
class Meta:
|
||||
ordering = ['order']
|
||||
|
||||
|
||||
class SortableTestCase(TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue