dynamic number
This commit is contained in:
parent
7e02c13372
commit
3f642bb591
2 changed files with 9 additions and 5 deletions
|
@ -15,12 +15,12 @@
|
|||
|
||||
<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>
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue