Settings — django-applepodcast 0.1 documentation

# Settings

The app offers several settings. By default, they are:

    PODCAST_SINGULAR = True

    PODCAST_ID = 1

    PODCAST_EPISODE_LIMIT = None

    PODCAST_NO_ARTWORK = 'podcast/img/no_artwork.png'

    PODCAST_PAGINATE_BY = 10

    PODCAST_ALLOWED_TAGS = ['p', 'ol', 'ul', 'a', 'em', 'i', 'b', 'li', 'strong']

## `PODCAST_SINGULAR`

A boolean indicating display of multiple podcast shows.

The app displays a single show by default. If you would like to display multiple shows, set the `PODCAST_SINGULAR` variable in `settings.py`.

    PODCAST_SINGULAR = False

If you have multiple shows, you might want to edit the URL pattern in `urls.py` from `podcast/` to `podcasts/`, although the difference is purely cosmetic.

    urlpatterns = [
        # ...
        url(r'^podcasts/', include('podcast.urls')),
    ]

## `PODCAST_ID`

An integer indicating the primary key of the show to display; used when `PODCAST_SINGULAR` is `True`. Concept modeled after the `SITE_ID` setting used in the Sites application.

The app displays the first show by default.

## `PODCAST_EPISODE_LIMIT`

An integer indicating the number of episodes to display in a show feed or `None` to display all episodes. Formerly the limit was an arbitrary 50 episodes.

The app displays all episodes in a show feed by default.

## `PODCAST_NO_ARTWORK`

A string indicating the path to an image used when artwork is lacking; used for shows, episodes, and video enclosures.

Although the path can be customized in the setting, you’re probably better off overriding the image look up at the project level; that is, creating a new image at `myproject/static/podcast/img/no_artwork.png`.

## `PODCAST_PAGINATE_BY`

An integer indicating how many items to display in a list view or in a detail view of related objects; used for shows and episodes.

## `PODCAST_ALLOWED_TAGS`

A list indicating which HTML tags are allowed for display in output; used for show summaries and episode notes. The database can store HTML, but tags not specified in the list are stripped out, and the remaining output is wrapped in `<![CDATA[...]]>` tags. Uses the Bleach Python package.

The list allows HTML tags as specified by the iOS 11 Apple Podcasts specification by default. The list also includes the conspicuously absent `<li>` and `<strong>` tags, which appear to be an oversight on Apple’s part because `<ol>`, `<ul>`, and `<b>` are present in the original list.