Allow to adjust the order of products (closes #60)

This commit is contained in:
Raphael Michel
2015-06-03 00:48:35 +02:00
parent f68132f006
commit 3114e2d959
6 changed files with 105 additions and 9 deletions

View File

@@ -860,10 +860,14 @@ class Item(Versionable):
),
default=False
)
position = models.IntegerField(
default=0
)
class Meta:
verbose_name = _("Product")
verbose_name_plural = _("Products")
ordering = ("category__position", "category", "position")
def __str__(self):
return str(self.name)