API Documentation

class wagtail_podcast.models.PodcastPage(*args, **kwargs)

Model that acts as a specific podcast and is a child of the PodcastParentPage object

exception DoesNotExist
exception MultipleObjectsReturned
blubrry_url

Returns the blubrry url

Return type:str
Returns:Blubrry URL
clean()

Validates that the audio file passed is indeed a valid MP3 file.

get_archives()

Gets the archives relating to the podcast

Parameters:self
Return type:list
Returns:List of dictionaries containing ‘date’ as key and a podcast as a value
get_context(request, *args, **kwargs)

Returns the context for a given page. This overriden function adds the archives to the context.

Parameters:
  • request (HttpRequest) – Django request object
  • args – Django request *args
  • kwargs – Django request **kwargs
Returns:

Django/Wagtail context object

get_feed_url

Get the url of the feed that represents the rss/xml file of the podcast

Return type:str
Returns:URL of the rss/xml feed
get_podcast_url

Get the url of the parent podcast page

Return type:str
Returns:URL of the parent page
google_url

Returns the Google Play url

Return type:str
Returns:Google Play URL
itunes_url

Returns the itunes url

Return type:str
Returns:Itunes URL
save(*args, **kwargs)

Saves the model and adds metadata like length of file in bytes for Itunes and other services and well as adds the duration to the model.

Parameters:
  • args – Not important
  • kwargs – Not important
class wagtail_podcast.models.PodcastParentPage(*args, **kwargs)

The model that acts as the base page for the podcast. All podcasts are children of this page and this page lists the various podcasts.

exception DoesNotExist
exception MultipleObjectsReturned
archiveMonth(request, **kwargs)

Routing for a specific year and month combination

Parameters:
  • request (HttpRequest) – Normal Django request object
  • kwargs – Normal Django request kwargs
Return type:

HttpResponse

Returns:

Page displaying the podcasts from a specific month and year combo with pagination

archiveYear(request, **kwargs)

Returns the entries of a year

Parameters:
  • request (HttpRequest) – Django request object
  • kwargs – Django request kwargs
Return type:

HttpResponse

Returns:

HttpResponse

get_archives()

Return the archives of the podcast (date-based)

Return type:list
Returns:List of dictionaries containing a key of ‘date’ and an archive to accompany it
get_context(request, *args, **kwargs)

Normal get_context used by Wagtail overridden to include to archives and podcasts

Parameters:
  • request (HttpRequest) –
  • args – Django request args
  • kwargs – Django request kwargs
Returns:

Context of the page

get_feed_url

Returns the url of the feed of the podcast. Used for subscribing to and submitting to services like iTunes

Return type:str
Returns:URL of the podcast
get_pagination(request, kwargs)

Paginates the podcast queryset. We return the last 5 podcasts by default.

Parameters:
  • request (HttpRequest) – Django request object
  • kwargs – Django kwargs associated with the request
Return type:

Paginator

Returns:

Returns a pagination object

get_podcast_url

Return URL of a the podcast parent page

Return type:str
Returns:Url of the podcast parent page
get_podcasts

Returns all the podcast objects that are currently live

Return type:QuerySet
Returns:Returns a Queryset of all the podcast objects
podcastFeed(request, **kwargs)

Routing for the feed url for use by clients and services to access the rss/xml feed

Parameters:
  • request (HttpRequest) – Normal django request
  • kwargs – Normal django request kwargs
Return type:

HttpResponse

Returns:

rss/xml file