Skip to content

ko1es/django-youtubefield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

django-youtubefield

Django youtube url field

Installation

pip install git+git://github.com/ko1es/django-youtubefield.git

Basic usage

Use it like any regular model field:

from youtubeurl_field.modelfields import YoutubeUrlField
class Item(models.Model):
    name = models.CharField(max_length=255)
    video = YoutubeUrlField(blank=True, null=True)

Template usage

Use .embed_url in your templates to insert it in

	{% if item.video %}
	<div class="flex-video widescreen">
		<iframe width="500" height="281" src="{{ item.video.embed_url }}" frameborder="0" allowfullscreen></iframe>
	</div>
	{% else %}

About

Django youtube url field

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages