From 3f642bb591222862390cfdb0f8661f15bcf5e492 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 27 Oct 2021 12:37:40 +0100 Subject: [PATCH] dynamic number --- app/templates/index.html | 10 +++++----- app/text/views.py | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/templates/index.html b/app/templates/index.html index 8ccefcc..5a4c723 100755 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -9,18 +9,18 @@

回望未來

Video art program 錄像計畫
-

Asian Art Biennale 2021

+

Asian Art Biennale 2021

2021亞洲藝術雙年展

2021.10.30 - 2022.3.6

-

16 films on Asian futures, past and present

-

16 部關於亞洲未來、過去與現在的影片

+

{{ films }} films on Asian futures, past and present

+

{{ films }}部關於亞洲未來、過去與現在的影片

-

32 video essays within or across films

-

32篇影像隨筆與解析

+

{{ texts }} video essays within or across films

+

{{ texts}}篇影像隨筆與解析

diff --git a/app/text/views.py b/app/text/views.py index 7cd4aa5..f6c14d8 100755 --- a/app/text/views.py +++ b/app/text/views.py @@ -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):