Django app for easy embeding YouTube and Vimeo videos and music from SoundCloud.
Project description
django-embed-video
Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
Documentation
Documentation is here: http://django-embed-video.rtfd.org/
Quick start
Install django-embed-video:
pip install django-embed-video
or from sources
pip install git+https://github.com/jazzband/django-embed-video
Add embed_video to INSTALLED_APPS in your Django settings.
If you want to detect HTTP/S in template tags, you have to set request context processor in settings.TEMPLATES:
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', # ... 'OPTIONS': { 'context_processors': [ # ... 'django.template.context_processors.request', ], }, }, ]
Usage of 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 }} {% video my_video "large" %} {% endvideo %} <!-- Or embed shortcut: --> {% video my_video '800x600' %}
Usage of model fields
from django.db import models from embed_video.fields import EmbedVideoField class Item(models.Model): video = EmbedVideoField() # same like models.URLField()
Contributing
This is a Jazzband project. By contributing you agree to abide by the Contributor Code of Conduct and follow the guidelines.
Changes
Release 1.3.1 (January 6, 2020)
Add support for Vimeo review video URLs.
Update example project code.
Release 1.3 (August 30, 2019)
Drop unsupported Python version prior to 3.6.
Drop unsupported Django versions prior to 1.11.
Add support for Python up to 3.8 including PyPy.
Add support for Django up to 2.2.
Improve project structure, docs and language.
Improve CI and CD infrastructure and automation.
Move project to Jazzband organization.
Release 1.2.0 (October 04, 2018)
hotfix docs directive (#94)
update docs (#92)
use tests_require and setup_requires for nose testing requirements (#91)
add renderer kwarg to Widget render method to support Python 2.1 and later (#88)
enable default HTTPS support for YouTube, VimeoBackend, SoundCloudBackend (#86)
added syntax highlight in README.rst (#81)
updating requests >=2.19
Release 1.1.2 (April 27, 2017)
fix pypi
Release 1.1.1 (March 24, 2017)
Release 1.1.0 (Jan 19, 2016)
Release 1.0.0 (May 01, 2015)
Backward incompatible changes:
filter embed_video_tags.embed has been removed
Backward compatible changes:
Release 0.11 (July 26, 2014)
Release 0.10 (May 24, 2014)
Release 0.9 (Apr. 04, 2014)
Release 0.8 (Feb. 22, 2014)
Release 0.7 (Dec. 21, 2013)
Support for sites running on HTTPS
embed filter is deprecated and replaced by video filter.
caching for whole backends was removed and replaced by caching properties
minor improvements on example project (fixtures, urls)
Release 0.6 (Oct. 04, 2013)
Ability to overwrite embed code of backend
Caching backends properties
PyPy compatibility
Admin video mixin and video widget
Release 0.5 (Sep. 03, 2013)
Added Vimeo thumbnails support
Added caching of results
Added example project
Fixed template tag embed
Fixed raising UnknownIdException in YouTube detecting.
Release 0.4 (Aug. 22, 2013)
Documentation was rewrited and moved to http://django-embed-video.rtfd.org/ .
Custom backends (http://django-embed-video.rtfd.org/en/latest/examples.html#custom-backends).
Improved YouTube and Vimeo regex.
Support for Python 3.
Renamed base to backends.
Release 0.3 (Aug. 20, 2013)
Security fix: faked urls are treated as invalid. See this page for more details.
Fixes:
allow of empty video field.
requirements in setup.py
Added simplier way to embed video in one-line template tag:
{{ 'http://www.youtube.com/watch?v=guXyvo2FfLs'|embed:'large' }}
backend variable in video template tag.
Usage:
{% video item.video as my_video %} Backend: {{ my_video.backend }} {% endvideo %}
Release 0.2 (June 25, 2013)
Support of SoundCloud
Release 0.1 (June 1, 2013)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_embed_video-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fa4404c539f3932e7e942c7f9865a0c08a0b786d9f327c1f62b8f7afbc3f1a9 |
|
MD5 | 6507d6e7b1e545361ebc114368e842e4 |
|
BLAKE2b-256 | dbf20177c5457ecdecfe8a576a26d2fac90100d51874caae98dccaa770c65f58 |