Skip to main content

django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.

GitHub Actions Supported Python versions Supported Django versions

Documentation

Documentation is at: https://django-embed-video.readthedocs.io/

Quick start

  1. Install django-embed-video:

    pip install django-embed-video

    or from sources

    pip install git+https://github.com/django-commons/django-embed-video
  2. Add embed_video to INSTALLED_APPS in your Django settings.

  3. 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',
                ],
            },
        },
    ]
  4. 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' %}
  5. 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 Django Commons project. By contributing you agree to abide by the Contributor Code of Conduct.

Changes

Release 1.5.0 (November 21, 2026)

  • Switched to trusted publisher release process with Django Commons.

  • Switch from Jazzband org to Django Commons.

  • Require Python 3.11 or newer and Django 5.2 or newer.

  • Add Django 6.1 support.

  • Add Python 3.15 and PyPy 3.11 support.

  • Fix YouTube error 153 by adding referrerpolicy to the embed code (#217).

  • Fix a syntax warning on Python 3.12.

  • Stop installing the abandoned readme package when building.

  • Include the Polish translation in the wheel.

  • Repair the documentation build on Read the Docs.

Release 1.4.10 (May 7, 2024)

  • Update Python and Django versions.

  • Use importlib.metadata instead of deprecated pkg_resources.

Release 1.4.9 (July 1, 2023)

  • Update Python and Django versions.

  • Fix Soundcloud tests.

  • Add example sites.

Release 1.4.8 (November 19, 2022)

  • Fixes in migrations and documentation.

Release 1.4.7 (September 28, 2022)

  • Fix rST file formatting for release automation approval.

Release 1.4.6 (September 28, 2022)

  • Use Django 3.2 LTS for the example project.

  • Add URLvalidator to validate input in the admin widget.

Release 1.4.5 (September 1, 2022)

  • Add support for Django 4.1

Release 1.4.4 (April 18, 2022)

  • Add EMBED_VIDEO_YOUTUBE_CHECK_THUMBNAIL to settings.

  • Drop support for EOL Django 2.2.

Release 1.4.3 (April 8, 2022)

  • Add support for YouTube short URLs.

Release 1.4.2 (March 17, 2022)

  • Add Polish translation

Release 1.4.1 (January 6, 2022)

  • Add Code of Conduct to repository

  • Add support for Python 3.10

  • Add support for Django 3.2 and Django 4.0

  • Drop support for EOL Python 3.6

  • Drop support for EOL Django 3.0 and EOL Django 3.1

  • Remove Nose from dependencies due to version incompatibility

Release 1.4.0 (December 18, 2020)

  • Add lazy loading for video template tags.

  • Handle Vimeo admin “manage” URLs

  • Migrate from Travis CI to GitHub Actions.

  • Drop unsupported Django versions prior to 2.2.

  • Add support for Python up to 3.9.

  • Add support for Django up to 3.1.

  • Improve code formatting.

Release 1.3.3 (June 10, 2020)

  • Fix admin UI exception with form validation.

Release 1.3.2 (March 29, 2020)

  • Add support for Soundcloud mobile URLs.

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)

  • updates for Django 1.10 and 1.11 (#73)

  • update requirements for installation of the example project (#72)

  • use secure connection to query soundcloud endpoint (#68)

Release 1.1.0 (Jan 19, 2016)

  • added support fort Django 1.9 (#52)

  • if possible YouTube thumbnails are returned in better resolution (#43)

Release 1.0.0 (May 01, 2015)

Backward incompatible changes:

  • filter embed_video_tags.embed has been removed

  • changed behaviour of extra params in video tag (#34, #36)

Backward compatible changes:

  • added support for Django 1.7 and Django 1.8

  • added support for Vimeo channels (#47)

  • fix resizing of SoundCloud iframe (#41)

Release 0.11 (July 26, 2014)

  • add support for YouTube mobile urls (#27)

  • fix passing parameters in calling request library (#28)

  • fix validation of urls (#31)

Release 0.10 (May 24, 2014)

  • video tag accepts kwargs (#20)

  • video tag will not crash anymore with None passed as url (#24)

Release 0.9 (Apr. 04, 2014)

  • Add VideoBackend.template_name and rendering embed code from file.

  • Allow relative sizes in template tag (#19).

  • Fix handling invalid urls of SoundCloud. (#21).

  • Catch VideoDoesntExistException and UnknownBackendException in template tags and admin widget.

  • Add base exception EmbedVideoException.

Release 0.8 (Feb. 22, 2014)

  • Add EMBED_VIDEO_TIMEOUT to settings.

  • Fix renderering template tag if no url is provided (#18)

  • If EMBED_VIDEO_TIMEOUT timeout is reached in templates, no exception is raised, error is just logged.

  • Fix default size in template tag. (See more…)

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)

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

Metadata

Release files for django-embed-video 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-embed-video 1.5.0
File Size Uploaded Provenance Actions
django_embed_video-1.5.0.tar.gz 41.6 kB With provenance Details for django_embed_video-1.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-embed-video 1.5.0
File Interpreter ABI Platform Actions
django_embed_video-1.5.0-py3-none-any.whl Python 3 none any Details for django_embed_video-1.5.0-py3-none-any.whl

Total release size: 68.7 kB

Release files / django_embed_video-1.5.0.tar.gz

Download URL django_embed_video-1.5.0.tar.gz
Size 41.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e1f2e3286970af3d60304437cdc4b0bacdec141516c7b280003675485ba375f8
BLAKE2b-256 checksum
How to use checksums
5534ce08ad9623c619631c4d5a98a6497b4ad07b9295f4f1e8d1831781bc5691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / django_embed_video-1.5.0-py3-none-any.whl

Download URL django_embed_video-1.5.0-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb15cbb73ff048eb7297d6fa67104ae125a5243f498fcb694d1a4fbce67efc8d
BLAKE2b-256 checksum
How to use checksums
8330953d5fc13972fc94ce9a77f8b6689992bc8c9e73ee12d762daf9d8c9de4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for django-embed-video 1.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_embed_video-1.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page