bearstech

Welcome to django-videos’s documentation!

django-videos is a “fork” of django-attachment to allow you to link some youtube videos to your models

Installation

With easy_install:

$ easy_install -U django-videos

With pip:

$ pip install django-videos

Configuration

With DjangoPluggableApp:

PLUGGABLE_APPS = ('djangovideos', )

Manual...

setting.py:

TEMPLATE_DIRS = (
 '/your_path/django-videos/djangovideos/templates',
)
TEMPLATE_CONTEXT_PROCESSORS = (
 'django.core.context_processors.i18n',
 'django.core.context_processors.request'
)
INSTALLED_APPS = (
 'djangovideos'
)

urls.py:

urlpatterns = patterns('',
  ('^videos/', include('djangovideos.urls')),
)

Simple usage

{% load video_tags %}

{% video_form object %}

{% get_videos_for object as "videos" %}
{% for video in videos %}
  {% embed_video video 230x200 %}
  {% embed_video video 640x505 %}
{% endfor %}

Indices and tables

Table Of Contents

This Page