|
@ -5,7 +5,7 @@ from django.core.exceptions import ObjectDoesNotExist |
|
|
from django.views import generic |
|
|
from django.views import generic |
|
|
from django.utils.translation import gettext as _ |
|
|
from django.utils.translation import gettext as _ |
|
|
from django.http import Http404 |
|
|
from django.http import Http404 |
|
|
from django.db.models import Q, Sum, Count |
|
|
from django.db.models import Q |
|
|
from django.views.generic.base import RedirectView |
|
|
from django.views.generic.base import RedirectView |
|
|
from django.core.exceptions import PermissionDenied |
|
|
from django.core.exceptions import PermissionDenied |
|
|
from django.contrib.staticfiles.finders import find |
|
|
from django.contrib.staticfiles.finders import find |
|
@ -17,25 +17,18 @@ from seminar.models import Problem, Cislo, Reseni, Nastaveni, Rocnik, \ |
|
|
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 |
|
|
from treenode import treelib |
|
|
|
|
|
import treenode.templatetags as tnltt |
|
|
|
|
|
import treenode.serializers as vr |
|
|
|
|
|
from vysledkovky.utils import body_resitelu, VysledkovkaCisla, \ |
|
|
from vysledkovky.utils import body_resitelu, VysledkovkaCisla, \ |
|
|
VysledkovkaRocniku, VysledkovkaDoTeXu |
|
|
VysledkovkaRocniku, VysledkovkaDoTeXu |
|
|
|
|
|
|
|
|
from datetime import date, datetime |
|
|
|
|
|
from django.utils import timezone |
|
|
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 |
|
|
import subprocess |
|
|
import subprocess |
|
|
import shutil |
|
|
import shutil |
|
|
import os |
|
|
|
|
|
import os.path as op |
|
|
import os.path as op |
|
|
from django.conf import settings |
|
|
from django.conf import settings |
|
|
import unicodedata |
|
|
import unicodedata |
|
|
import logging |
|
|
|
|
|
import time |
|
|
|
|
|
from collections.abc import Sequence |
|
|
from collections.abc import Sequence |
|
|
import http |
|
|
import http |
|
|
|
|
|
|
|
@ -51,8 +44,6 @@ from seminar.utils import aktivniResitele |
|
|
#def temata_v_rocniku(rocnik): |
|
|
#def temata_v_rocniku(rocnik): |
|
|
# return Problem.objects.filter(typ=Problem.TYP_TEMA, rocnik=rocnik) |
|
|
# return Problem.objects.filter(typ=Problem.TYP_TEMA, rocnik=rocnik) |
|
|
|
|
|
|
|
|
logger = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
def get_problemy_k_tematu(tema): |
|
|
def get_problemy_k_tematu(tema): |
|
|
return Problem.objects.filter(nadproblem = tema) |
|
|
return Problem.objects.filter(nadproblem = tema) |
|
|
|
|
|
|
|
|