|
@ -48,8 +48,7 @@ class TabulkaOdevzdanychReseniView(TemplateView): |
|
|
reseni_k_tomuto_problemu = m.Reseni.objects.filter( |
|
|
reseni_k_tomuto_problemu = m.Reseni.objects.filter( |
|
|
resitele__in=[resitel], # Snad funguje i takhle |
|
|
resitele__in=[resitel], # Snad funguje i takhle |
|
|
hodnoceni__problem__in=[problem], # ditto |
|
|
hodnoceni__problem__in=[problem], # ditto |
|
|
) |
|
|
).order_by('-cas_doruceni') |
|
|
.order_by('-cas_doruceni') |
|
|
|
|
|
pocet_reseni = reseni_k_tomuto_problemu.count() |
|
|
pocet_reseni = reseni_k_tomuto_problemu.count() |
|
|
nejnovejsi = reseni_k_tomuto_problemu.first().cas_doruceni |
|
|
nejnovejsi = reseni_k_tomuto_problemu.first().cas_doruceni |
|
|
pocet_bodu = max( |
|
|
pocet_bodu = max( |
|
@ -65,6 +64,7 @@ class TabulkaOdevzdanychReseniView(TemplateView): |
|
|
posledni_odevzdani=nejnovejsi, |
|
|
posledni_odevzdani=nejnovejsi, |
|
|
body=pocet_bodu, |
|
|
body=pocet_bodu, |
|
|
) |
|
|
) |
|
|
|
|
|
) |
|
|
return ctx |
|
|
return ctx |
|
|
|
|
|
|
|
|
class ReseniProblemuView(ListView): |
|
|
class ReseniProblemuView(ListView): |
|
|