GithubHelp home page GithubHelp logo

vmazur / django-embed-video Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jazzband/django-embed-video

0.0 2.0 0.0 1005 KB

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

Home Page: http://django-embed-video.rtfd.org/

License: MIT License

Python 96.63% HTML 3.37%

django-embed-video's Introduction

django-embed-video

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

image

image

image

image

Documentation

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

Quick start

  1. Install django-embed-video:

    pip install django-embed-video

    or from sources

    pip install git+https://github.com/yetty/django-embed-video.git
  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.TEMPLATE_CONTEXT_PROCESSORS:

    TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'django.core.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()

django-embed-video's People

Contributors

bburan avatar calzzetta avatar nossila avatar rolo avatar salahaddin avatar sergiobrr avatar szuliq avatar techdragon avatar yetty avatar z4r avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.