Login

Tag "youtube"

Snippet List

convert youtube url for iframe, js api

[code] {% get_video_urls url as url_object %} or get object attribute: {% get_video_urls obj "url" as url_object %} {{ url_object }} original url {{ url_object.video_id }} original url or video_id {{ url_object.resource }} youtube, vimeo, None {{ url_object.iframe_url }} original url or iframe_url {{ url_object.js_api_url }} original url or js_api_url [/code]

  • url
  • youtube
  • embed
  • iframe
  • vimeo
  • video_id
Read More

ultralize

This is a function based on django's urlize modified to show different media based on their url. It supports images, links, mp3/ogg links, youtube videos, vimeo videos and dailymotion videos. I added a switch called mini to have two modes to show things in different places. When mini is activated it will only parse the first url provided and discard the rest as well as limiting the height.

  • html
  • youtube
  • urlize
  • parser
  • vimeo
  • dailymotion
  • url-to-image
  • url-to-video
  • urlze
Read More

YouTube Template Filter

Given a youtube url (can copy and paste right from the browser) turns the url into an embedded video. If you put this in your app's templatetags/filters.py, you can do the following >{{ object.youtube_url|youtube }} and it would embed the youtube video.

  • template
  • filter
  • youtube
  • embed
Read More

youtubize template tag

This snippet is based on djangos urlize filter. It converts http:// links to youtube into youtube-embed statements, so that one can provide a simple link to a youtube video and this filter will embed it. I used it for a fun blog app.

  • youtube
  • embed
  • urlize
Read More

7 snippets posted so far.