From d22a0f01808c4f59c27e7f5e2f4a76efd26bb0a4 Mon Sep 17 00:00:00 2001 From: Alexander Metzger Date: Tue, 26 Sep 2023 23:07:25 -0700 Subject: [PATCH] added index to ordering --- glossary_resources/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/glossary_resources/models.py b/glossary_resources/models.py index 750f05cd7..d58889a25 100644 --- a/glossary_resources/models.py +++ b/glossary_resources/models.py @@ -11,6 +11,14 @@ class GlossaryResource(models.Model): class Meta: ordering = ["useage_count", "last_updated"] + indexes = [ + models.Index( + fields=[ + "useage_count", + "last_updated", + ] + ), + ] def get_clean_name(self): return str(self.glossary_name).lower()