From 19cb03b8e9b2dc28a84236f1c58ef598843e9320 Mon Sep 17 00:00:00 2001 From: Piotr Dobrowolski Date: Wed, 13 Dec 2017 21:38:44 +0100 Subject: [PATCH] models: Order categories by name by default --- storage/models.py | 3 +++ 1 file changed, 3 insertions(+) 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ć