MassMedia 1.3b3 documentation

You Tube Collections

In version 0.8 preliminary support for external services was added. The first service supported was creating a Collection of a playlist.

Creating a collection from a YouTube playlist will not import the videos on the playlist. Because you can change the playlist independently of the Django admin interface, it would be difficult to keep it in sync with YouTube. It is easy to use the Google YouTube API to get all the videos dynamically. See YouTube Collections and Templates.


The YouTube API requires 3 settings, EMAIL, USERNAME, PASSWORD:

    'YOUTUBE': {
        'EMAIL': '',
        'USERNAME': '',
        'PASSWORD': '',

Getting the playlist URL

YouTube has several different URLs that reference the playlist, depending on how you get to the playlist page.

User’s playlist page

If you go to any user’s page and click on the “Playlists” button


you can select a playlist from the list on the right.


The address bar address will change to look similar to:

Playlist management page

If you go to My Videos & Playlists


and select Playlists from the list on the left.


You can use the Link: field URL; which is formatted like:

If you look at the URL in the Embed: field, it contains a URL like:

This URL requires you to chop off the question mark and everything after it:

Creating the Collection

  1. Create a new Collection object in the admin.
  2. Give the new collection a name
  3. Enter the playlist URL retrieved earlier into the External URL field.
  4. Select the Site.
  5. Save.

For information on displaying the collection, see YouTube Collections and Templates.