Skip to content

Commit

Permalink
Ordering courses by readable_id in cms
Browse files Browse the repository at this point in the history
  • Loading branch information
annagav committed Feb 6, 2025
1 parent 5e62bfe commit 3bca7eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ def get_context(self, request, *args, **kwargs):
}

content_panels = [ # noqa: RUF005
InlinePanel("course"),
FieldPanel("course"),
FieldPanel("topics"),
] + ProductPage.content_panels

Expand Down
2 changes: 1 addition & 1 deletion courses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class Course(TimestampedModel, ValidateOnSaveMixin):
"""Model for a course"""

class Meta:
ordering = ["id"]
ordering = ["readable_id"]

objects = CourseQuerySet.as_manager()
title = models.CharField(max_length=255)
Expand Down

0 comments on commit 3bca7eb

Please sign in to comment.