From 8b531011ce5dab0f2b80b6304e2c3a0bdc96c155 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 11 Oct 2021 14:44:02 +0100 Subject: [PATCH] load date, bio --- app/video/management/commands/load_titles.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()