gregmarra/the-blue-alliance — pull request #762 by fangeugene (2013-09-23 07:18:59+00:00)
Title: Media model

Towards #726

This isn't done yet, but wanted to get a diff up so more eyes can take a look at it early on.

Currently, it allows the addition of CD photos or YouTube videos from team pages in the admin console. Once the media is added, it will appear on the team page in the admin console (nothing is user-facing yet). Adding the same photo or video to another team won't create a new object; it will instead just update the reference KeyProperty to include the new team. This is able to scale so that the KeyProperty can also include other models, such as Events or Matches :wink:.

To test:
- Go to the team detail page in the admin console. Ex: `/admin/team/254`
- Pick a random year and add a link such as `http://chiefdelphi.com/media/photos/39142` or `http://www.youtube.com/watch?v=u7k5IxsixO4` (these are the only two types of links we currently support)
- Navigate to another team page, repeat the process with the same links or different links.
- Verify in the datastore viewer (`/datastore?kind=Media`) that there are as many entries as the number of unique links you added.