{ "info": { "author": "Guillaume Pousseo", "author_email": "guillaumepousseo@revsquare.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Documentation", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "#################\nDjango Brightcove\n#################\n\nManages the integration of brightcove videos in a django project. It extends the the Brightcove library developed by Jonathan Beluch: https://pypi.python.org/pypi/brightcove/0.2\n\nIt basically add a form field to easily integrate brightcove account video in the django admin or any form. And adds a template tag to fast integrate a brightcove video in a template.\n\n*******\nInstall\n*******\n\nIt is strongly recommanded to install this theme from GIT with PIP onto you project virtualenv.\n\nFrom PyPi\n\n.. code-block:: shell-session\n\n pip install django-brightcove\n\nFrom Github\n\n.. code-block:: shell-session\n\n https://github.com/RevSquare/django-brightcove#egg=django-brightcove\n\n\n*****\nSetup\n*****\n\nBefore starting, you will need a Brightcove API token in order to connect to brightcove: http://docs.brightcove.com/en/video-cloud/media/guides/managing-media-api-tokens.html\n\nThe first step is to add the app in your installed apps list in settings.py\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'django_brightcove'\n ...\n )\n\nThe you will need to declare the loaders you want to add in your settings.py file\n\n.. code-block:: python\n\n BRIGHTCOVE_TOKEN = 'YOUR_TOKEN..'\n\nFinally you will need to add the django-brightcove urls to your Root URLCONF\n\n.. code-block:: python\n\n urlpatterns = patterns('',\n ...\n\n (r'^django_brightcove', include('django_brightcove.urls')),\n ...\n )\n\n\n\n*********************************\nAdd a Brightcove video to a model\n*********************************\n\nSimply add the Brightcove field manager to it.\n\n.. code-block:: python\n\n from django.db import models\n from django_brightcove.fields import BrightcoveField\n\n\n class MyModel(models.Model):\n brightcove = BrightcoveField()\n\n\n\n*************\nTemplate tags\n*************\n\nYou can easily insert a video with a built in template tag.\n\nThe first step is to list your brightcove player id and key in your settings file.\n\n.. code-block:: python\n\n BRIGHTCOVE_PLAYER = {\n 'default': {\n 'PLAYERID': 'a_default_player_id',\n 'PLAYERKEY': 'a_default_player_key',\n },\n 'single': {\n 'PLAYERID': 'another_player_id',\n 'PLAYERKEY': 'another_player_key',\n },\n }\n\nThen within your template, simply call for the player tag and pass your video id and eventualy a specific brightcove player type. By default the tag with the key set as 'default' in settings.BRIGHTCOVE_PLAYER dictionary.\n\n.. code-block:: html\n\n {% load brightcove %}\n\n