|
@ -13,7 +13,7 @@ from django.contrib.staticfiles.finders import find |
|
|
import seminar.models as s |
|
|
import seminar.models as s |
|
|
import seminar.models as m |
|
|
import seminar.models as m |
|
|
from seminar.models import Problem, Cislo, Reseni, Nastaveni, Rocnik, \ |
|
|
from seminar.models import Problem, Cislo, Reseni, Nastaveni, Rocnik, \ |
|
|
Organizator, Resitel, Novinky, Tema, Clanek, \ |
|
|
Resitel, Novinky, Tema, Clanek, \ |
|
|
Deadline # Tohle je stare a chceme se toho zbavit. Pouzivejte s.ToCoChci |
|
|
Deadline # Tohle je stare a chceme se toho zbavit. Pouzivejte s.ToCoChci |
|
|
#from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva |
|
|
#from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva |
|
|
from seminar import utils |
|
|
from seminar import utils |
|
@ -24,7 +24,6 @@ from vysledkovky.utils import body_resitelu, VysledkovkaCisla, \ |
|
|
VysledkovkaRocniku, VysledkovkaDoTeXu |
|
|
VysledkovkaRocniku, VysledkovkaDoTeXu |
|
|
|
|
|
|
|
|
from datetime import date, datetime |
|
|
from datetime import date, datetime |
|
|
from django.utils import timezone |
|
|
|
|
|
from itertools import groupby |
|
|
from itertools import groupby |
|
|
from collections import OrderedDict |
|
|
from collections import OrderedDict |
|
|
import tempfile |
|
|
import tempfile |
|
@ -224,34 +223,6 @@ def aktualni_temata(rocnik): |
|
|
return Tema.objects.filter(rocnik=rocnik, stav='zadany').order_by('kod') |
|
|
return Tema.objects.filter(rocnik=rocnik, stav='zadany').order_by('kod') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Co je M&M |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Organizatori |
|
|
|
|
|
def aktivniOrganizatori(datum=timezone.now()): |
|
|
|
|
|
return Organizator.objects.exclude( |
|
|
|
|
|
organizuje_do__isnull=False, |
|
|
|
|
|
organizuje_do__lt=datum |
|
|
|
|
|
).order_by('osoba__jmeno') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CojemamOrganizatoriView(generic.ListView): |
|
|
|
|
|
model = Organizator |
|
|
|
|
|
template_name = 'seminar/cojemam/organizatori.html' |
|
|
|
|
|
queryset = aktivniOrganizatori() |
|
|
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
|
|
context = super(CojemamOrganizatoriView, self).get_context_data(**kwargs) |
|
|
|
|
|
context['aktivni'] = True |
|
|
|
|
|
return context |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CojemamOrganizatoriStariView(generic.ListView): |
|
|
|
|
|
model = Organizator |
|
|
|
|
|
template_name = 'seminar/cojemam/organizatori.html' |
|
|
|
|
|
queryset = Organizator.objects.exclude( |
|
|
|
|
|
id__in=aktivniOrganizatori()).order_by('-organizuje_do') |
|
|
|
|
|
|
|
|
|
|
|
### Archiv |
|
|
### Archiv |
|
|
|
|
|
|
|
|
|
|
|
|
|
|