Skip to content

Commit

Permalink
#105 only show theme selector on pages where the theme can be changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ephes committed Sep 9, 2023
1 parent a1e4def commit 5cc7632
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cast/models/index_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def get_context(self, request: HtmxHttpRequest, *args, **kwargs) -> ContextDict:
context = self.paginate_queryset(context, self.get_published_posts(filterset.qs), get_params)
context["posts"] = context["object_list"] # convenience
context["blog"] = self
context["has_selectable_themes"] = True
context["use_audio_player"] = any([post.has_audio for post in context["posts"]])
context["theme_form"] = self.get_theme_form(request)
return context
Expand Down

0 comments on commit 5cc7632

Please sign in to comment.