|
@ -5,7 +5,7 @@ from django.views import generic |
|
|
from django.utils.translation import ugettext as _ |
|
|
from django.utils.translation import ugettext as _ |
|
|
from django.http import Http404 |
|
|
from django.http import Http404 |
|
|
|
|
|
|
|
|
from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik, Soustredeni, Organizator |
|
|
from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik, Soustredeni, Organizator, Resitel |
|
|
from . import utils |
|
|
from . import utils |
|
|
|
|
|
|
|
|
def AktualniZadaniView(request): |
|
|
def AktualniZadaniView(request): |
|
@ -167,8 +167,16 @@ class SoustredeniView(generic.DetailView): |
|
|
def StavDatabazeView(request): |
|
|
def StavDatabazeView(request): |
|
|
# nastaveni = Nastaveni.objects.get() |
|
|
# nastaveni = Nastaveni.objects.get() |
|
|
problemy = utils.seznam_problemu() |
|
|
problemy = utils.seznam_problemu() |
|
|
|
|
|
muzi = Resitel.objects.filter(pohlavi_muz=True) |
|
|
|
|
|
zeny = Resitel.objects.filter(pohlavi_muz=False) |
|
|
return render(request, 'seminar/stav_databaze.html', |
|
|
return render(request, 'seminar/stav_databaze.html', |
|
|
{ |
|
|
{ |
|
|
# 'nastaveni': nastaveni, |
|
|
# 'nastaveni': nastaveni, |
|
|
'problemy': problemy, |
|
|
'problemy': problemy, |
|
|
|
|
|
|
|
|
|
|
|
'resitele': Resitel.objects.all(), |
|
|
|
|
|
'muzi': muzi, |
|
|
|
|
|
'zeny': zeny, |
|
|
|
|
|
'jmena_muzu': utils.histogram([r.jmeno for r in muzi]), |
|
|
|
|
|
'jmena_zen': utils.histogram([r.jmeno for r in zeny]), |
|
|
}) |
|
|
}) |
|
|