From 42c498923ccba0bce7e8c0a98d156d62c606a0ab Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Wed, 3 Mar 2021 10:35:54 +0100 Subject: [PATCH] Order activities by name by default --- mood/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mood/models.py b/mood/models.py index c8a30c4..555a7f8 100644 --- a/mood/models.py +++ b/mood/models.py @@ -53,6 +53,9 @@ class ActivityCategory(models.Model): return self.name class Activity(models.Model): + class Meta: + ordering = ["name"] + user = models.ForeignKey(get_user_model(), models.CASCADE) name = models.CharField(max_length=64) icon = models.CharField(default="fas fa-check", max_length=64)