padma videos list

This commit is contained in:
Sanj 2012-06-20 22:39:59 +05:30
parent 3d8de06494
commit b065291879
2 changed files with 21 additions and 6 deletions

View File

@ -25,19 +25,23 @@ class PadmaVideo(ItfModel):
data = DictField(default={}, editable=False) data = DictField(default={}, editable=False)
layers = DictField(default={}, editable=False) layers = DictField(default={}, editable=False)
fts = ['title']
def __unicode__(self): def __unicode__(self):
return self.padma_id return self.padma_id
def get_dict(self): def get_dict(self):
return { return {
'embed_code': self.embed_code, #'embed_code': self.embed_code,
'url': self.url, #'url': self.url,
'padma_id': self.padma_id,
'duration': self.duration,
'title': self.title, 'title': self.title,
'data': self.data, 'data': self.data,
'time_in': self.time_in, #'time_in': self.time_in,
'time_out': self.time_out, #'time_out': self.time_out,
'layers':self.layers 'layers':self.layers,
'clips': self.padmaclip_set.all()
} }
@property @property

View File

@ -0,0 +1,11 @@
<div class="videoTitle">{{ title }}</div>
<div class="pandoraVideo" data-pandora-id="{{ padma_id }}" data-pandora-layers="transcripts"></div>
<script type="text/javascript" src="/static/js/jquery.pandoravideo.js"></script>
<script type="text/javascript">
$(function() {
$('.pandoraVideo').pandoravideo();
});
</script>