from django.shortcuts import render from various import utils from personalni.models import Resitel def StavDatabazeView(request): # nastaveni = Nastaveni.objects.get() problemy = utils.seznam_problemu() muzi = Resitel.objects.filter(osoba__pohlavi_muz=True) zeny = Resitel.objects.filter(osoba__pohlavi_muz=False) return render( request, 'seminar/stav_databaze.html', { # 'nastaveni': nastaveni, 'problemy': problemy, 'resitele': Resitel.objects.all(), 'muzi': muzi, 'zeny': zeny, 'jmena_muzu': utils.histogram([r.osoba.jmeno for r in muzi]), 'jmena_zen': utils.histogram([r.osoba.jmeno for r in zeny]), } )