summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-12-13 21:38:44 +0100
committerPiotr Dobrowolski <admin@tastycode.pl>2017-12-13 21:38:44 +0100
commit19cb03b8e9b2dc28a84236f1c58ef598843e9320 (patch)
treed04a8500b45778259d790cbf27441b87f649fd51
parent7cf67e41959c1014e4f4c1d4098e37f5b1c0b330 (diff)
downloadspejstore-19cb03b8e9b2dc28a84236f1c58ef598843e9320.tar.gz
spejstore-19cb03b8e9b2dc28a84236f1c58ef598843e9320.tar.bz2
spejstore-19cb03b8e9b2dc28a84236f1c58ef598843e9320.zip
models: Order categories by name by default
-rw-r--r--storage/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/models.py b/storage/models.py
index cf1729c..4977db1 100644
--- a/storage/models.py
+++ b/storage/models.py
@@ -29,6 +29,9 @@ class Category(models.Model):
def __str__(self):
return self.name
+ class Meta:
+ ordering = ['name']
+
# TODO label versioning
# Zapisywać w URL na naklejce jej wersję, aby można było łatwo wyłapać