dynamic number

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

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):