Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Can now play from QuerySet type, as well as list or url, pass in Quer…

…ySet with an .url property to use. Builds playlist automatically
  • Loading branch information...
commit ce70f8adf5ebc410a1423476f8f37e40c0017e4e 1 parent 8b5be05
@mfitzp authored
View
2  README.txt
@@ -13,3 +13,5 @@ Starting as a fork of django-videoplayer, the purpose of this app is to provide
complete implementation of flowplayer configuration from within the Django framework.
Currently it is possible to output multiple player 'classes' using an optional tag
allowing different media to be presented in different ways.
+
+Now requires JQuery
View
2  flowplayer/templates/flowplayer/flowplayer.html
@@ -12,7 +12,7 @@
{% if player_config.clip %}
clip : {
{% for keycl, valuecl in player_config.clip.items %}
- {{ keycl }}: {{ valuecl }},
+ {{ keycl|safe }}: {{ valuecl|safe }},
{% endfor %}
},
{% endif %}
View
5 flowplayer/templatetags/flowplayer_tags.py
@@ -1,4 +1,5 @@
from django.conf import settings
+from django.db.models.query import QuerySet
from django.template import TemplateSyntaxError, VariableDoesNotExist, Node
from django.template import Library, Variable, loader, Context
@@ -58,6 +59,10 @@ def render(self, context):
# Can resolve, push first url into the url variable
self.media_url = self.media[0]['url']
self.media_playlist = self.media
+ if isinstance(self.media, QuerySet):
+ # Can resolve, push first url into the url variable
+ self.media_url = self.media[0].url
+ self.media_playlist = self.media
else:
self.media_url = self.media
self.media_playlist = False

0 comments on commit ce70f8a

Please sign in to comment.
Something went wrong with that request. Please try again.