Django app for easy embeding YouTube and Vimeo videos and music from SoundCloud.
Documentation is here: http://django-embed-video.rtfd.org/
Install
django-embed-video
:pip install django-embed-video
or from sources
pip install git+https://github.com/yetty/django-embed-video.git
Add
embed_video
toINSTALLED_APPS
in your Django settings.Use template tags:
{% load embed_video_tags %} The video tag: {% video item.video as my_video %} URL: {{ my_video.url }} Thumbnail: {{ my_video.thumbnail }} Backend: {{ my_video.backend }} {% endvideo %} Or embed shortcut: {{ my_video|embed:'800x600' }}
Use model fields
from django.db import models from embed_video.fields import EmbedVideoField class Item(models.Model): video = EmbedVideoField() # same like models.URLField()