Skip to content

Commit

Permalink
only use author field + fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ephes committed May 9, 2024
1 parent df31f20 commit efff9a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 15 additions & 2 deletions cast/models/index_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ def last_build_date(self) -> datetime:
def author_name(self) -> str:
if self.author is not None:
return self.author
else:
return self.owner.get_full_name()
return ""

@property
def unfiltered_published_posts(self) -> models.QuerySet[Post]:
Expand Down Expand Up @@ -319,6 +318,20 @@ class Podcast(Blog):
help_text=_("``Clean`` will put the clean iTunes graphic by it."),
)

content_panels = Page.content_panels + [
FieldPanel("description", classname="full"),
FieldPanel("email"),
FieldPanel("author"),
FieldPanel(
"itunes_artwork", help_text=_("The image that will be used in the podcast feed as the iTunes artwork.")
),
FieldPanel("template_base_dir"),
]

promote_panels = Page.promote_panels + [
FieldPanel("noindex"),
]

subpage_types = ["cast.Post", "cast.Episode"]
is_podcast = True

Expand Down
2 changes: 0 additions & 2 deletions docs/blog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ is then used to populate following attributes in the feed:
- `itunes:name`
- `author_name` in atom feed

If the `author`-field is not set `blog.owner.get_full_name()` is used instead.

Template Base Dir
=================

Expand Down

0 comments on commit efff9a3

Please sign in to comment.