add artist name

This commit is contained in:
j 2021-10-26 12:09:16 +01:00
parent 38e6bc6313
commit bfac91c779
3 changed files with 4 additions and 2 deletions

View file

@ -100,5 +100,6 @@
padding-bottom: 32px;
max-width: var(--container-width);
margin: auto;
line-height: 1.4;
}
}

View file

@ -286,7 +286,8 @@ function renderAnnotations(config) {
var div = document.createElement('div')
div.classList.add('related-film')
div.innerHTML = `
Film cited: <a href="${config.item_url}">${config.item_title} ${config.item_title_zh}</a><br>
film cited: <a href="${config.item_url}">${config.item_title} - ${config.item_director[0]}</a><br>
电影引用: <a href="${config.item_url}">${config.item_title_zh} - ${config.item_director[1]}</a>
`
box.appendChild(div)
ascroll.appendChild(box)

View file

@ -145,7 +145,7 @@ class Text(models.Model):
if item_id:
item = Film.objects.filter(padma_id=item_id).first()
if item:
for key in ('title', 'title_zh'):
for key in ('title', 'title_zh', 'director'):
data['item_' + key] = item.data[key]
data['item_url'] = item.get_absolute_url()
if isinstance(self.annotations, list) and len(self.annotations) > 0: