dual title, director
This commit is contained in:
parent
1516b7349a
commit
85b4a0b7d6
4 changed files with 40 additions and 8 deletions
|
|
@ -18,7 +18,7 @@ class Command(BaseCommand):
|
|||
},
|
||||
'keys': [
|
||||
'id', 'title', 'director', 'summary', 'source', 'sourcedescription', 'date', 'location',
|
||||
'duration'
|
||||
'duration', 'featuring', 'cinematographer'
|
||||
],
|
||||
'range': [0, 1000]
|
||||
}
|
||||
|
|
@ -26,7 +26,9 @@ class Command(BaseCommand):
|
|||
print(item)
|
||||
f, c = models.Film.objects.get_or_create(padma_id=item['id'])
|
||||
for key, value in item.items():
|
||||
if key != 'id':
|
||||
if key == 'title':
|
||||
f.data['title'], f.data['title_zh'] = value.split(' / ', 1)
|
||||
elif key != 'id':
|
||||
f.data[{
|
||||
'sourcedescription': 'bio'
|
||||
}.get(key, key)] = value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue