include more info on film page
This commit is contained in:
parent
844af58b1d
commit
1516b7349a
3 changed files with 78 additions and 71 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import logging
|
||||
import json
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import get_user_model
|
||||
|
|
@ -36,6 +37,13 @@ class Film(models.Model):
|
|||
def duration(self):
|
||||
return ox.format_timecode(self.data['duration'])[:-4]
|
||||
|
||||
|
||||
def json(self):
|
||||
data = {}
|
||||
data['id'] = self.padma_id
|
||||
return json.dumps(data)
|
||||
|
||||
|
||||
class Edit(models.Model):
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
modified = models.DateTimeField(auto_now=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue