百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

django-embed-video

> 编程语言
开源

Django 应用,可轻松嵌入 YouTube 和 Vimeo 视频以及来自 SoundCloud 的音乐。

396 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Django 应用,可轻松嵌入 YouTube 和 Vimeo 视频以及来自 SoundCloud 的音乐。

django-embed-video

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

.. image:: https://jazzband.co/static/img/badge.svg :target: https://jazzband.co/ :alt: Jazzband .. image:: https://github.com/jazzband/django-embed-video/workflows/Test/badge.svg :target: https://github.com/jazzband/django-embed-video/actions :alt: GitHub Actions .. image:: https://coveralls.io/repos/yetty/django-embed-video/badge.svg?branch=master :target: https://coveralls.io/r/yetty/django-embed-video?branch=master :alt: Coveralls coverage percentage .. image:: https://img.shields.io/pypi/pyversions/django-embed-video.svg :target: https://pypi.org/project/django-embed-video/ :alt: Supported Python versions .. image:: https://img.shields.io/pypi/djversions/django-embed-video.svg :target: https://pypi.org/project/django-embed-video/ :alt: Supported Django versions

Documentation

Documentation is at: http://django-embed-video.rtfd.org/

Quick start

#. Install django-embed-video:

::

bash
  pip install django-embed-video

or from sources

::

bash
  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:

.. code-block:: python

   TEMPLATES = [
       {
           'BACKEND': 'django.template.backends.django.DjangoTemplates',
           # ...
           'OPTIONS': {
               'context_processors': [
                   # ...
                   'django.template.context_processors.request',
               ],
           },
       },
   ]

#. Usage of template tags:

.. code-block:: html+django

  {% load embed_video_tags %}

  
  {% video item.video as my_video %}
    URL: {{ my_video.url }}
    Thumbnail: {{ my_video.thumbnail }}
    Backend: {{ my_video.backend }}

    {% video my_video "large" %}
  {% endvideo %}

  
  {% video my_video '800x600' %}

#. Usage of model fields

.. code-block:: python

  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 _.

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言