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)
layers = DictField(default={}, editable=False)
fts = ['title']
def __unicode__(self):
return self.padma_id
def get_dict(self):
return {
'embed_code': self.embed_code,
'url': self.url,
#'embed_code': self.embed_code,
#'url': self.url,
'padma_id': self.padma_id,
'duration': self.duration,
'title': self.title,
'data': self.data,
'time_in': self.time_in,
'time_out': self.time_out,
'layers':self.layers
#'time_in': self.time_in,
#'time_out': self.time_out,
'layers':self.layers,
'clips': self.padmaclip_set.all()
}
@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>