load date, bio

This commit is contained in:
j 2021-10-11 14:44:02 +01:00
parent cb9ffc1a7c
commit 8b531011ce

View file

@ -16,7 +16,7 @@ class Command(BaseCommand):
'query': {
'conditions': [{'key': 'groups', 'value': options['group'], 'operator': '=='}]
},
'keys': ['id', 'title', 'director', 'summary', 'source'],
'keys': ['id', 'title', 'director', 'summary', 'source', 'sourcedescription', 'date', 'location'],
'range': [0, 1000]
}
for item in api.find(**query)['data']['items']:
@ -24,7 +24,9 @@ class Command(BaseCommand):
f, c = models.Film.objects.get_or_create(padma_id=item['id'])
for key, value in item.items():
if key != 'id':
f.data[key] = value
f.data[{
'sourcedescription': 'bio'
}.get(key, key)] = value
f.public = True
f.slug = item['id']
f.save()