dual title, director
This commit is contained in:
parent
1516b7349a
commit
85b4a0b7d6
4 changed files with 40 additions and 8 deletions
|
@ -32,10 +32,16 @@ main > .film {
|
|||
.info {
|
||||
margin: 8px;
|
||||
margin-bottom: 32px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
margin: 24px 0;
|
||||
}
|
||||
h2 {
|
||||
margin: 24px 0;
|
||||
}
|
||||
}
|
||||
video {
|
||||
width: 100%;
|
||||
|
@ -45,5 +51,20 @@ main > .film {
|
|||
margin: 8px;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.texts {
|
||||
padding-top: 16px;
|
||||
.text {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 799px) {
|
||||
h1 {
|
||||
span {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,15 @@
|
|||
|
||||
<div class="film">
|
||||
<div class="info">
|
||||
<h1>{{ film.data.title | safe }}</h1>
|
||||
{% comment %}
|
||||
<h2>{{ film.data.director|join:", "|safe }}</h2>
|
||||
{% endcomment %}
|
||||
<h1>
|
||||
<span>{{ film.data.title | safe }}</span>
|
||||
<span>{{ film.data.title_zh | safe }}</span>
|
||||
</h1>
|
||||
<h2>
|
||||
{% for director in film.data.director %}
|
||||
{{ director|safe }}<br>
|
||||
{% endfor %}
|
||||
</h2>
|
||||
<p>{{ film.data.summary|safe }}</p>
|
||||
<div class="details">
|
||||
Runtime: {{ film.duration }},
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
<div class="films">
|
||||
{% for film in films %}
|
||||
<div class="film">
|
||||
<h1><a href="{{ film.get_absolute_url }}">{{ film.data.title | safe }}</a></h1>
|
||||
<h2>{{ film.data.director|join:", "|safe }}</h2>
|
||||
<h1><a href="{{ film.get_absolute_url }}">
|
||||
{{ film.data.title | safe }}
|
||||
|
||||
{{ film.data.title_zh | safe }}
|
||||
</a></h1>
|
||||
<h2>{{ film.data.director|join:" "|safe }}</h2>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@ class Command(BaseCommand):
|
|||
},
|
||||
'keys': [
|
||||
'id', 'title', 'director', 'summary', 'source', 'sourcedescription', 'date', 'location',
|
||||
'duration'
|
||||
'duration', 'featuring', 'cinematographer'
|
||||
],
|
||||
'range': [0, 1000]
|
||||
}
|
||||
|
@ -26,7 +26,9 @@ class Command(BaseCommand):
|
|||
print(item)
|
||||
f, c = models.Film.objects.get_or_create(padma_id=item['id'])
|
||||
for key, value in item.items():
|
||||
if key != 'id':
|
||||
if key == 'title':
|
||||
f.data['title'], f.data['title_zh'] = value.split(' / ', 1)
|
||||
elif key != 'id':
|
||||
f.data[{
|
||||
'sourcedescription': 'bio'
|
||||
}.get(key, key)] = value
|
||||
|
|
Loading…
Reference in a new issue