korean
This commit is contained in:
parent
fa32bea04b
commit
af1d00a0b2
5 changed files with 13 additions and 18 deletions
|
|
@ -39,7 +39,7 @@ class Command(BaseCommand):
|
|||
continue
|
||||
if isinstance(item['folder'], list):
|
||||
print(item['id'])
|
||||
|
||||
|
||||
if item['folder'] not in folders:
|
||||
description = item['folderdescription'] or item['summary']
|
||||
folders[item['folder']] = {
|
||||
|
|
@ -58,12 +58,13 @@ class Command(BaseCommand):
|
|||
folders[item['folder']]['items'].append(item)
|
||||
|
||||
for item in folders.values():
|
||||
f, c = models.Film.objects.get_or_create(pandora_url=item['url'])
|
||||
slug = escape_slug(item['title'].split(' / ')[0])
|
||||
f, c = models.Film.objects.get_or_create(slug=slug)
|
||||
f.pandora_url = item['url']
|
||||
for key, value in item.items():
|
||||
if key != 'url':
|
||||
f.data[{
|
||||
}.get(key, key)] = value
|
||||
if c:
|
||||
f.public = True
|
||||
f.slug = escape_slug(item['title'])
|
||||
f.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue