Skip to content

Commit

Permalink
sort by -created by default for forms with audio foreign key like tra…
Browse files Browse the repository at this point in the history
…nscripts
  • Loading branch information
ephes committed Nov 10, 2024
1 parent c5a9439 commit f284586
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cast/models/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class Audio(CollectionMember, index.Indexed, TimeStampedModel):
episodes: models.QuerySet["Episode"] # mypy needs this
tags = TaggableManager(help_text=None, blank=True, verbose_name=_("tags"))

class Meta:
ordering = ("-created",)

@property
def uploaded_audio_files(self) -> Iterable[tuple[str, models.FileField]]:
for name in self.audio_formats:
Expand Down
1 change: 1 addition & 0 deletions docs/releases/0.2.41.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ not yet finished.
- #167 Fixed the styling of the audio player
- #168 Add transcript model
- Better icons for audio, video and transcript MenuItems
- Order the audio models by default by -created for forms with audio foreign key like TranscriptForm

0 comments on commit f284586

Please sign in to comment.