Django app for easy embeding YouTube and Vimeo videos and music fromSoundCloud.
Project description
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()
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
django-embed-video-1.1.2.tar.gz
(17.7 kB
view details)
File details
Details for the file django-embed-video-1.1.2.tar.gz
.
File metadata
- Download URL: django-embed-video-1.1.2.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caa7b4c3d277bc20ce0ceab371aab33a4374b1ac6b406106d47f97953b033c51 |
|
MD5 | 66a517995f0d350ca06ae7d6cf1b2931 |
|
BLAKE2b-256 | 1dc09e7e8033256aac4feab495ba334cee6bbf14ef41cdad734d9f687d7128eb |