mirror of
https://github.com/Hopiu/django-embed-video.git
synced 2026-03-17 05:40:24 +00:00
Major changes: - filter ``embed`` is replaced by tag ``video``. - removed caching for whole backend, caching properties instead. - HTTP or HTTPS is set by context.is_secure() (just for ``video`` tag). - backends can be HTTP only (``allow_https = False``). Minor changes: - changed theme of docs to RTD theme. - help about testing HTTPS on development server. - added and modified tests
11 lines
350 B
Python
11 lines
350 B
Python
import re
|
|
|
|
from embed_video.backends import VideoBackend
|
|
|
|
|
|
class CustomBackend(VideoBackend):
|
|
re_detect = re.compile(r'http://myvideo\.com/[0-9]+')
|
|
re_code = re.compile(r'http://myvideo\.com/(?P<code>[0-9]+)')
|
|
|
|
pattern_url = '{protocol}://play.myvideo.com/c/{code}/'
|
|
pattern_thumbnail_url = '{protocol}://thumb.myvideo.com/c/{code}/'
|