prepare for bio translations
This commit is contained in:
parent
85b4a0b7d6
commit
2abeacccb6
3 changed files with 23 additions and 3 deletions
|
@ -42,6 +42,15 @@ main > .film {
|
|||
h2 {
|
||||
margin: 24px 0;
|
||||
}
|
||||
.details {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.bio {
|
||||
margin-top: 16px;
|
||||
div {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
video {
|
||||
width: 100%;
|
||||
|
|
|
@ -14,9 +14,16 @@
|
|||
</h2>
|
||||
<p>{{ film.data.summary|safe }}</p>
|
||||
<div class="details">
|
||||
Runtime: {{ film.duration }},
|
||||
Year: {{ film.data.date}},
|
||||
Artist Bio: {{ film.data.bio|safe }}
|
||||
Runtime: {{ film.duration }}
|
||||
</div>
|
||||
<div class="bio">
|
||||
<div class="en">
|
||||
{{film.data.director.0}}: {{ film.data.bio|safe }}
|
||||
</div>
|
||||
<div class="zh">
|
||||
{{film.data.director.1}}: {{ film.data.bio_zh|safe }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<video src="{{ settings.TIMELINE_PREFIX }}{{ film.padma_id }}/loop.mp4" autoplay loop muted></video>
|
||||
|
|
|
@ -28,9 +28,13 @@ class Command(BaseCommand):
|
|||
for key, value in item.items():
|
||||
if key == 'title':
|
||||
f.data['title'], f.data['title_zh'] = value.split(' / ', 1)
|
||||
elif key == 'sourcedescription':
|
||||
if '<br><br>' in value:
|
||||
f.data['bio'], f.data['bio_zh'] = value.split('<br><br>', 1)
|
||||
else:
|
||||
f.data['bio'] = f.data['bio_zh'] = value
|
||||
elif key != 'id':
|
||||
f.data[{
|
||||
'sourcedescription': 'bio'
|
||||
}.get(key, key)] = value
|
||||
f.public = True
|
||||
f.slug = item['id']
|
||||
|
|
Loading…
Reference in a new issue