Skip to content

Commit

Permalink
added index to ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Sep 27, 2023
1 parent d504804 commit d22a0f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions glossary_resources/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit d22a0f0

Please sign in to comment.