Django Podcasting

Audio podcasting functionality for django sites.

The source code for Django Podcasting can be found and contributed to on django-podcasting. There you can also file tickets.

History

Django Podcasting started off as a heavily stripped down version of the wonderful django-podcast. Eventually this app grew enough differences to be useful to others as a reusable applciation outside of my sandbox. I hope it inspires you to share your sounds with the rest of the world, whatever they may be.

This application can seen running on:

Differences

At the time I had no interset in the Video podcasting features of django-podcast and video introduces a lot of extra complexity into the application, considering I was first studying compliance with the various specs and the syndication feed framework.

This application also differs from django-podcast in that it uses UUID identifiers, support multiple authors,makes use of Django’s sites framework and syndication feed framework. Podcasting only supports Django 1.3 or greater due to its choice in class-based views, though writing additional views and urls to work with 1.2 would be a trivial task. There are also other less significant diffences which may or may not be of relavance to your project.

Nomenclature

An individual podcast is a show.

A show has many episodes 001, 002, etc.

An episode has one or many enclosures formats for example .flac, .wav or .mp3.

Requirements

django-podcasting requires django-autoslug which is included in the setup.py.

Features

Feeds
Supports Atom, RSS 2.0, iTunes, and FeedBurner by attempting to match as best as possible their detailed specifications and additionally utilizing Django’s syndication feed framework.
Multi-site
Supports Django’s sites framework allowing for great flexibility in the relationships between shows and sites in a multi-site application.

Licensing

To publish a podcast to iTunes it is required to set a license. It is suggested to install django-licenses which provides a light weight mechanism for adding licenses to the shows.
Serve your media from anywhere
Podcasting assumes nothing about where your media file will be stored, simply save any valid url to an enclosure object.
Multiple enclosure types
Want to offer versions in .ogg, .flac, and .mp3? It’s possible.
UUID
Podcasting uses a UUID field for show and episode uniqueness rather than relying on the url.
Bundled Forms and Templates
Podcasting comes with some example forms to get you started with for allowing site users ability to manage a show. Generic templates are also bundled to get you started.
Comments

To add commenting to you app, you must use a separate Django application. One of the simplest options is django-disqus, but you should also look into django-threadedcomments and Django’s built in comments framework.

There is an field on both the Show and Episode models to enable commenting. The default is to enable commenting. To completely disable comments for all of an individual show’s episodes, set enable_comments field on the Show model to False. To disable comments on an individual episode, set enable_comments on the Show model to True and enable_comments on the Episode model to False.

Draft Mode

You may work on the new episode in and publish it when ready, simply by checking publish in the Admin. While in draft mode the episode’s get_absolute_url returns a link comprised of the show_slug and the episode’s uuid but once live, it uses the show slug, friendlier publish date and episode slug.

Optional Features

The following features are expected to work with the most recent versions of the following libraries, if you find an issue please report it on github.

Thumbnailed Album Artwork Install django-imagekit,
easy-thumbnails or sorl-thumbnails_ in your project to get sane defaults and model support for album artwork thumbnails. Either may be is added to your project at point any time and the django-podcasting app will recognize and use it. It is highly advised to use a thumbnailing app because thumbnailing podcast artwork for iTunes is nontrivial. Support for other thumbnail libraries will be considered for inclusion.
Taggable episodes and shows
Install django-taggit to provide tagging support for episodes and shows. Taggit may be is added to your project at point any time and the django-podcasting app will recognize and support it. Taggit may become a requirement in 1.0 if there are no strong objections.
Share to Twitter
Django Pocasting can optionally provide the ability to announce new episodes on twitter. Install python-twitter to get started.
Embeddable Media
Want to display Youtube, Vimeo or Soundcloud content on Episode detail pages? Django Pocasting provides the ability to link to external embeddable media via the podcasting.models.EmbedMedia class. Optionally install django-embed-video for easy embedding of YouTube and Vimeo videos and music from SoundCloud.

Usage

There has yet to be a need to configure anything via the settings.py file and the included templates and forms should be enough to get started. One area that may be somewhat difficult is connecting with a commenting application. For the simplest option, take a look at django-disqus.

Future

For the 0.9.x series I’d like to first see if others have interest in this application and fix any issues discovered with the current version.

If there is desire, video support after a 1.0 (audio only) version has been released is possible.

Contents

Installation

  • Tested against Django 1.8 and greater.

  • Install Django Podcasting with your favorite Python package manager:

    pip install django-podcasting
    
  • Add "podcasting", "django.contrib.sites", and the optional apps of your choice to the INSTALLED_APPS setting in your settings.py:

    INSTALLED_APPS = (
        ...
        "django.contrib.admin",
        "django.contrib.sites",
        ...
        "podcasting",
        ...
    )
    
  • Include podcasting.urls and podcasting.urls_feeds in your urls definition:

    url(r"^podcasts/", include("podcasting.urls")),
    url(r"^feeds/podcasts/", include("podcasting.urls_feeds")),
    

Optional Dependencies

The following features are expected to work with the most recent versions of the following libraries, if you find an issue please report it on github.

Thumbnails

You may chose between the following three thumbnail libraries or none, if imagekit is installed django-podcsating will use that, else it will check for easy-thumbnails, followed by sorl.

Here is an example settings.THUMBNAIL_ALIASES for easy-thumbnails. iTunes sizes are to spec.:

THUMBNAIL_ALIASES = {
    "podcasting.Show.original_image": {
        "sm": {"size": (120, 120)},
        "lg": {"size": (550, 550)},
        "itunes_sm": {"size": (144, 144)},
        "itunes_lg": {"size": (1400, 1400)},
    },
    "podcasting.Episode.original_image": {
        "sm": {"size": (120, 120)},
        "lg": {"size": (550, 550)},
        "itunes_sm": {"size": (144, 144)},
        "itunes_lg": {"size": (1400, 1400)},
    },
}

Tagging

If django-taggit is installed, tagging will be enabled for Episodes and Shows:

Licencing

If django-licenses is installed, the show will contain the license field which which is helpful for publishing podcasts on iTunes:

Tweeting

Want to send a tweet every time a new Episode is created?

If python-twitter is installed, automatic posts for new tweets is possible:

Media Embedding

Want to display Youtube, Vimeo or Soundcloud content on Episode detail pages?

Changelog

1.3.2

  • Fix for initial migration with photologue - @urtzai

1.3.1

  • Bugfix for imports

1.3.0

  • Django 1.10 compatibility - thanks @urtzai
  • Add support for Photologue - thanks @urtzai

1.2.0

  • Basque Translation - thanks @urtzai
  • Add next/prev methods to episode.

1.1.0

  • Multiple bugfixes
  • Improvments to queryset managers
  • Add a pretty description field for WYSIWYG editors

1.0.1

  • Improve onsite manager by supporting mutliple environments, and getting site from request

1.0.0

  • When no django-licensing is installed, show the Show’s CharField license. @nachopro
  • Setting to choose the path where podcast’s images will be saved. Thanks @nachopro

0.10.2

  • Fix for runserver warning, ‘max_length’ is ignored when used with IntegerField.

0.10.1

  • Add missing django-autoslug requirement to setup.py. Thanks @Rolando.

0.10.0

  • Fix unicode literals in models.py. Thanks @hakanw
  • Convert relationships for Enclosure, Episode, Sites into M2M to allow mix and match show creation. Thanks to Jeff Lindsey @djangolackey

0.9.10

  • Setting FEED_ENTRIES hides older episodes, use None (aka all) as default.
  • More forgiving error handling on images in feeds.

0.9.9

  • Add django-appconf to required packages
  • RedirectView fixes - kike721
  • Spanish translations - kike721
  • Use AppConf for pagination settings - kike721
  • Enforce that feed urls can only request supported mime types.
  • Make feed_urs more generic by removing /itunes/. Redirect old style.
  • Make django-licenses optional
  • Drop bundled AutoSlug and use django-autoslug
  • Rename the newly added Video class to EmbedMedia, and build in support for django-embed-video for easy embedding of SoundCloud, Vimeo and YouTube files on Episode detail pages.
  • Add a show.on_itunes boolean and relax required fields to allow simpler user forms when not publishing to iTunes.
  • Testing on Python3
  • Move runtests.py to homedir, drop django-nose and add test support for Django 1.7, add coverage and version badges.
  • Extend full support to easy-thumbnails and sorl
  • Extend the Admin widget to support sorl, imagekit, easy-thumbnails and css for thumbnailing.
  • Add a simple Video model for attaching extrnal video-urls to an episode.
  • Add more mime type choices for enclosures.
  • Upgrade imagekit to 3.0.4
  • Bump python-twitter to 1.0 and django-taggit to 0.10a1
  • Remove settings.SITE_ID default from Site field.
  • Setup Travis CI.
  • Flake8.
  • Support Django 1.5’s customizable user model. This change makes django-podacasting usuable only on Django versions 1.4 LTS and greater.
  • Fix autoslug
  • Fix for non ImageKit installs
  • Support Django 1.4’s timezone-aware datetimes

0.9.4

0.9.3

  • Bump imagekit version to 2.0.1
  • Add the missing publish option for shows in admin #9

0.9.2

  • Fix upload path for images, slugify was stripping the extension.
  • Simply user relationships to episodes and shows. Most importantly changing ‘authors’ to an ‘author_text’ charfield, and adding a Show.owner field. Requires a migration.
  • Remove unused show feed templates which were part of old django syndication framework.
  • Bump imagekit version to 1.1.0

0.9.1

  • Many small fixes.
  • Upgrade imagekit for better thumbnailing.
  • Better forms and internationalized templates.

0.9.0

  • First release.