This section contains information about how to configure your Django projects to use django-oembed-works and also contains a quick reference of the available settings that can be used in order to customize the functionality of this application.
In the Django project’s settings module, add oembed_works to the INSTALLED_APPS setting:
INSTALLED_APPS = (
...
'oembed_works',
)
The following settings can be specified in the Django project’s settings module to customize the functionality of django-oembed-works.
A dictionary of the format:
<provider_name>: (<endpoint_api_url>, [<regex1>, <regex2>, ...])
By default, the supported oEmbed providers are:
{
'YouTube': ('http://oohembed.com/oohembed/',
[r'http://(?:www\.)?youtube\.com/watch\?v=[A-Za-z0-9\-=_]{11}']),
'Vimeo': ('http://vimeo.com/api/oembed.json',
[r'http://(?:www\.)?vimeo\.com/\d+']),
'Dailymotion': ('http://oohembed.com/oohembed/',
[r'http://(?:www\.)?dailymotion\.com/video/[^<\S]+']),
'Flickr': ('http://www.flickr.com/services/oembed',
[r'http://(?:www\.)?flickr\.com/photos/\S+?/(?:sets/)?\d+/?']),
}
Finally, synchronize the project’s database using the following command:
python manage.py syncdb