diff --git a/app/video/management/commands/load_titles.py b/app/video/management/commands/load_titles.py index f04998c..16c7bd1 100644 --- a/app/video/management/commands/load_titles.py +++ b/app/video/management/commands/load_titles.py @@ -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()