dynamic number

This commit is contained in:
j 2021-10-27 12:37:40 +01:00
parent 7e02c13372
commit 3f642bb591
2 changed files with 9 additions and 5 deletions

View file

@ -9,18 +9,18 @@
<p>回望未來<p>
<div class="font-bold">Video art program 錄像計畫</div>
<p class="margin-reset">Asian Art Biennale 2021</p>
<p class="margin-reset">Asian Art Biennale 2021</p>
<p>2021亞洲藝術雙年展</p>
<p class="font-size-sm">2021.10.30 - 2022.3.6<p>
<div class="font-size-sm">
<div class="h3"><a href="{% url 'films'%}" class="font-bold">Films 影片</a></div>
<p class="margin-reset">16 films on Asian futures, past and present</p>
<p>16 部關於亞洲未來、過去與現在的影片<p>
<p class="margin-reset">{{ films }} films on Asian futures, past and present</p>
<p>{{ films }}部關於亞洲未來、過去與現在的影片<p>
<div class="h3"><a href="{% url 'texts' %}" class="font-bold">Assemblies 選集</a></div>
<p class="margin-reset">32 video essays within or across films</p>
<p>32篇影像隨筆與解析<p>
<p class="margin-reset">{{ texts }} video essays within or across films</p>
<p>{{ texts}}篇影像隨筆與解析<p>
<div class="h3"><a href="{% url 'about' %}" class="font-bold">About 關於</a></div>
</div>

View file

@ -7,7 +7,11 @@ def fallback(request):
return render(request, 'fallback.html', context)
def index(request):
from ..video.models import Film
from ..text.models import Text
context = {}
context['films'] = Film.objects.filter(public=True).count()
context['texts'] = Text.objects.filter(public=True).count()
return render(request, 'index.html', context)
#def index_alt(request):