dynamic number
This commit is contained in:
parent
7e02c13372
commit
3f642bb591
2 changed files with 9 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue