Django-Admin¶
Django Cast registers several models in the Django admin with custom actions and configuration.
Admin Actions¶
Cache file sizes (Audio)¶
The file sizes of audio objects are cached in metadata for display purposes. New uploads are cached automatically, but for older audio objects you can update the cache in bulk:
Go to Django Admin > Audio
Select the audio objects to update
Choose “Cache file sizes” from the action dropdown
Retrain spam filter (SpamFilter)¶
The Naive Bayes spam filter can be retrained from scratch using comments that have been manually classified as spam or ham:
Go to Django Admin > Spam Filters
Select the spam filter to retrain
Choose “Retrain model from scratch using marked comments” from the action dropdown
The admin list view shows precision and recall metrics for each filter, helping you assess filter quality.
Wagtail Admin Customizations¶
Django Cast extends the Wagtail admin with custom menu items and editor integrations.
Contributors Management¶
Contributors are registered as Wagtail snippets and are also linked directly from the Wagtail admin sidebar. This gives editors a top-level Contributors entry instead of requiring them to navigate through Snippets first. Contributor snippets include a default episode role and ordered profile links. When an editor adds a contributor to an episode, the episode assignment starts with that role and the first ordered profile link.
Editor Integration¶
Audio and video chooser URLs are injected into the Wagtail page editor, enabling the audio and video chooser modals when editing StreamField content blocks.
Page Link Caching¶
Django Cast registers a custom rich text link handler that caches page URLs. This improves performance when rendering pages with many internal links by avoiding repeated database lookups.