Přesun kódu modelů personálního
This commit is contained in:
parent
8c881621b0
commit
ebf8165c53
28 changed files with 46 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from seminar.models.personalni import Skola
|
from personalni.models import Skola
|
||||||
import seminar.views as v
|
import seminar.views as v
|
||||||
from seminar.utils import sync_skoly
|
from seminar.utils import sync_skoly
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ from dal import autocomplete
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
|
||||||
from seminar.models.personalni import Skola, Resitel
|
from personalni.models import Skola, Resitel
|
||||||
from seminar.models.tvorba import Problem, Nastaveni
|
from seminar.models.tvorba import Problem, Nastaveni
|
||||||
from .helpers import LoginRequiredAjaxMixin
|
from .helpers import LoginRequiredAjaxMixin
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from seminar.models.personalni import Skola
|
from personalni.models import Skola
|
||||||
from django.core import serializers as ser
|
from django.core import serializers as ser
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
def exportSkolView(request):
|
def exportSkolView(request):
|
||||||
|
|
|
@ -16,12 +16,11 @@ import os
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.encoding import force_text
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.utils.functional import cached_property
|
from django.utils.functional import cached_property
|
||||||
from django.utils.text import get_valid_filename
|
from django.utils.text import get_valid_filename
|
||||||
|
|
||||||
from seminar.models.personalni import Organizator
|
from personalni.models import Organizator
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from reversion import revisions as reversion
|
from reversion import revisions as reversion
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.forms import formset_factory
|
||||||
from django.forms.models import inlineformset_factory
|
from django.forms.models import inlineformset_factory
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from seminar.models.personalni import Resitel
|
from personalni.models import Resitel
|
||||||
from seminar.models.tvorba import Problem, Deadline, Nastaveni
|
from seminar.models.tvorba import Problem, Deadline, Nastaveni
|
||||||
from seminar.models.odevzdavatko import *
|
from seminar.models.odevzdavatko import *
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ from django import template
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
from personalni.utils import normalizuj_jmeno
|
from personalni.utils import normalizuj_jmeno
|
||||||
from seminar.models.personalni import Osoba # jen kvůli typové anotaci…
|
from personalni.models import Osoba # jen kvůli typové anotaci…
|
||||||
|
|
||||||
@register.filter
|
@register.filter
|
||||||
def jmeno_jako_prefix(o: Osoba):
|
def jmeno_jako_prefix(o: Osoba):
|
||||||
|
|
|
@ -18,7 +18,7 @@ import logging
|
||||||
|
|
||||||
from seminar.models.odevzdavatko import *
|
from seminar.models.odevzdavatko import *
|
||||||
from seminar.models.tvorba import Problem, Nastaveni, Rocnik, Deadline
|
from seminar.models.tvorba import Problem, Nastaveni, Rocnik, Deadline
|
||||||
from seminar.models.personalni import Resitel, Organizator, Osoba
|
from personalni.models import Resitel, Organizator, Osoba
|
||||||
from . import forms as f
|
from . import forms as f
|
||||||
from .forms import OdevzdavatkoTabulkaFiltrForm as FiltrForm
|
from .forms import OdevzdavatkoTabulkaFiltrForm as FiltrForm
|
||||||
from seminar.utils import resi_v_rocniku
|
from seminar.utils import resi_v_rocniku
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.auth.models import Group
|
from django.contrib.auth.models import Group
|
||||||
from django_reverse_admin import ReverseModelAdmin
|
from django_reverse_admin import ReverseModelAdmin
|
||||||
from seminar.models.personalni import *
|
from .models import *
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Osoba)
|
@admin.register(Osoba)
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.contrib.auth.forms import PasswordResetForm
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
from seminar.models.personalni import *
|
from .models import *
|
||||||
|
|
||||||
from datetime import date
|
from datetime import date
|
||||||
import logging
|
import logging
|
||||||
|
|
|
@ -11,7 +11,7 @@ from django_countries.fields import CountryField
|
||||||
|
|
||||||
from reversion import revisions as reversion
|
from reversion import revisions as reversion
|
||||||
|
|
||||||
from .base import SeminarModelBase
|
from seminar.models.base import SeminarModelBase
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ class Resitel(SeminarModelBase):
|
||||||
def vsechny_body(self):
|
def vsechny_body(self):
|
||||||
"Spočítá body odjakživa."
|
"Spočítá body odjakživa."
|
||||||
vsechna_reseni = self.reseni_set.all()
|
vsechna_reseni = self.reseni_set.all()
|
||||||
from .odevzdavatko import Hodnoceni
|
from seminar.models.odevzdavatko import Hodnoceni
|
||||||
vsechna_hodnoceni = Hodnoceni.objects.filter(
|
vsechna_hodnoceni = Hodnoceni.objects.filter(
|
||||||
reseni__in=vsechna_reseni)
|
reseni__in=vsechna_reseni)
|
||||||
return sum(h.body for h in list(vsechna_hodnoceni) if h.body is not None)
|
return sum(h.body for h in list(vsechna_hodnoceni) if h.body is not None)
|
||||||
|
@ -299,7 +299,7 @@ class Resitel(SeminarModelBase):
|
||||||
# - body z 25. ročníku a dříve byly shledány dvakrát hodnotnějšími
|
# - body z 25. ročníku a dříve byly shledány dvakrát hodnotnějšími
|
||||||
# - proto se započítávají dvojnásobně a byly posunuté hranice titulů
|
# - proto se započítávají dvojnásobně a byly posunuté hranice titulů
|
||||||
# - staré tituly se ale nemají odebrat, pokud řešitel v t.č. minulém (26.) ročníku měl titul, má ho mít pořád.
|
# - staré tituly se ale nemají odebrat, pokud řešitel v t.č. minulém (26.) ročníku měl titul, má ho mít pořád.
|
||||||
from .odevzdavatko import Hodnoceni
|
from seminar.models.odevzdavatko import Hodnoceni
|
||||||
hodnoceni_do_25_rocniku = Hodnoceni.objects.filter(deadline_body__cislo__rocnik__rocnik__lte=25,reseni__in=self.reseni_set.all())
|
hodnoceni_do_25_rocniku = Hodnoceni.objects.filter(deadline_body__cislo__rocnik__rocnik__lte=25,reseni__in=self.reseni_set.all())
|
||||||
novejsi_hodnoceni = Hodnoceni.objects.filter(reseni__in=self.reseni_set.all()).difference(hodnoceni_do_25_rocniku)
|
novejsi_hodnoceni = Hodnoceni.objects.filter(reseni__in=self.reseni_set.all()).difference(hodnoceni_do_25_rocniku)
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ class Resitel(SeminarModelBase):
|
||||||
else:
|
else:
|
||||||
return Titul.akad
|
return Titul.akad
|
||||||
|
|
||||||
from .odevzdavatko import Hodnoceni
|
from seminar.models.odevzdavatko import Hodnoceni
|
||||||
hodnoceni_do_26_rocniku = Hodnoceni.objects.filter(deadline_body__cislo__rocnik__rocnik__lte=26,reseni__in=self.reseni_set.all())
|
hodnoceni_do_26_rocniku = Hodnoceni.objects.filter(deadline_body__cislo__rocnik__rocnik__lte=26,reseni__in=self.reseni_set.all())
|
||||||
novejsi_body = body_z_hodnoceni(
|
novejsi_body = body_z_hodnoceni(
|
||||||
Hodnoceni.objects.filter(reseni__in=self.reseni_set.all())
|
Hodnoceni.objects.filter(reseni__in=self.reseni_set.all())
|
|
@ -1,4 +1,4 @@
|
||||||
from seminar.models.personalni import *
|
from .models import *
|
||||||
from various.utils import bez_diakritiky_translate
|
from various.utils import bez_diakritiky_translate
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
|
|
||||||
from seminar.models.odevzdavatko import *
|
from seminar.models.odevzdavatko import Hodnoceni
|
||||||
from seminar.models.personalni import Organizator, Resitel, Osoba
|
from .models import *
|
||||||
from seminar.models.tvorba import Tema, Uloha, Clanek, Nastaveni
|
from seminar.models.tvorba import Tema, Uloha, Clanek, Nastaveni
|
||||||
from seminar.models.soustredeni import Soustredeni
|
from seminar.models.soustredeni import Soustredeni
|
||||||
from .forms import PrihlaskaForm, ProfileEditForm, PoMaturiteProfileEditForm
|
from .forms import PrihlaskaForm, ProfileEditForm, PoMaturiteProfileEditForm
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.encoding import force_text
|
|
||||||
|
|
||||||
from seminar.models.soustredeni import Soustredeni
|
from seminar.models.soustredeni import Soustredeni
|
||||||
from seminar.models.personalni import Organizator
|
from personalni.models import Organizator
|
||||||
|
|
||||||
STAV_NAVRH = 1
|
STAV_NAVRH = 1
|
||||||
STAV_BUDE = 2
|
STAV_BUDE = 2
|
||||||
|
|
|
@ -7,7 +7,7 @@ from django.forms import Form
|
||||||
|
|
||||||
from prednasky.models import Prednaska, Hlasovani, Seznam, STAV_NAVRH
|
from prednasky.models import Prednaska, Hlasovani, Seznam, STAV_NAVRH
|
||||||
from seminar.models.soustredeni import Soustredeni
|
from seminar.models.soustredeni import Soustredeni
|
||||||
from seminar.models.personalni import Osoba
|
from personalni.models import Osoba
|
||||||
|
|
||||||
def newPrednaska(request):
|
def newPrednaska(request):
|
||||||
# hlasovani se vztahuje k nejnovejsimu soustredeni
|
# hlasovani se vztahuje k nejnovejsimu soustredeni
|
||||||
|
|
|
@ -10,7 +10,7 @@ from django.utils.safestring import mark_safe
|
||||||
# Todo: reversion
|
# Todo: reversion
|
||||||
|
|
||||||
from seminar.models.tvorba import Rocnik, Cislo, Deadline, ZmrazenaVysledkovka, Problem, Uloha, Tema, Clanek, Nastaveni
|
from seminar.models.tvorba import Rocnik, Cislo, Deadline, ZmrazenaVysledkovka, Problem, Uloha, Tema, Clanek, Nastaveni
|
||||||
from seminar.models.personalni import Resitel
|
from personalni.models import Resitel
|
||||||
from seminar.models.soustredeni import Konfera
|
from seminar.models.soustredeni import Konfera
|
||||||
from seminar.models.novinky import Novinky
|
from seminar.models.novinky import Novinky
|
||||||
from seminar.models.pomocne import Text, Obrazek
|
from seminar.models.pomocne import Text, Obrazek
|
||||||
|
|
|
@ -7,7 +7,7 @@ from django.core.management.base import BaseCommand
|
||||||
from django.core.management import call_command
|
from django.core.management import call_command
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from seminar.models.personalni import Skola, Resitel
|
from personalni.models import Skola, Resitel
|
||||||
from seminar.models.tvorba import Rocnik, Cislo, Problem
|
from seminar.models.tvorba import Rocnik, Cislo, Problem
|
||||||
from seminar.models.odevzdavatko import Reseni
|
from seminar.models.odevzdavatko import Reseni
|
||||||
from seminar.testutils import create_test_data
|
from seminar.testutils import create_test_data
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from .tvorba import *
|
from .tvorba import *
|
||||||
from .odevzdavatko import *
|
from .odevzdavatko import *
|
||||||
from .base import *
|
from .base import *
|
||||||
from .personalni import *
|
|
||||||
from .soustredeni import *
|
from .soustredeni import *
|
||||||
from .pomocne import *
|
from .pomocne import *
|
||||||
from .treenode import *
|
from .treenode import *
|
||||||
|
|
|
@ -4,7 +4,8 @@ from imagekit.processors import ResizeToFit
|
||||||
|
|
||||||
from reversion import revisions as reversion
|
from reversion import revisions as reversion
|
||||||
|
|
||||||
from . import personalni as pm
|
from personalni.models import Organizator
|
||||||
|
|
||||||
|
|
||||||
@reversion.register(ignore_duplicates=True)
|
@reversion.register(ignore_duplicates=True)
|
||||||
class Novinky(models.Model):
|
class Novinky(models.Model):
|
||||||
|
@ -26,7 +27,7 @@ class Novinky(models.Model):
|
||||||
],
|
],
|
||||||
options={'quality': 95})
|
options={'quality': 95})
|
||||||
|
|
||||||
autor = models.ForeignKey(pm.Organizator, verbose_name='Autor novinky', null=True,
|
autor = models.ForeignKey(Organizator, verbose_name='Autor novinky', null=True,
|
||||||
on_delete=models.SET_NULL)
|
on_delete=models.SET_NULL)
|
||||||
|
|
||||||
zverejneno = models.BooleanField('Zveřejněno', default=False)
|
zverejneno = models.BooleanField('Zveřejněno', default=False)
|
||||||
|
|
|
@ -10,7 +10,7 @@ from django.utils import timezone
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from seminar.models.tvorba import Cislo, Deadline, Problem, Uloha, aux_generate_filename
|
from seminar.models.tvorba import Cislo, Deadline, Problem, Uloha, aux_generate_filename
|
||||||
from seminar.models.personalni import Resitel
|
from personalni.models import Resitel
|
||||||
from seminar.models.base import SeminarModelBase
|
from seminar.models.base import SeminarModelBase
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ from reversion import revisions as reversion
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from . import personalni as pm
|
from personalni.models import Resitel, Organizator
|
||||||
|
|
||||||
from .base import SeminarModelBase
|
from .base import SeminarModelBase
|
||||||
from seminar.models.tvorba import Rocnik, Problem, aux_generate_filename
|
from seminar.models.tvorba import Rocnik, Problem, aux_generate_filename
|
||||||
|
@ -41,10 +41,10 @@ class Soustredeni(SeminarModelBase):
|
||||||
misto = models.CharField('místo soustředění', max_length=256, blank=True, default='',
|
misto = models.CharField('místo soustředění', max_length=256, blank=True, default='',
|
||||||
help_text='Místo (název obce, volitelně též objektu')
|
help_text='Místo (název obce, volitelně též objektu')
|
||||||
|
|
||||||
ucastnici = models.ManyToManyField(pm.Resitel, verbose_name='účastníci soustředění',
|
ucastnici = models.ManyToManyField(Resitel, verbose_name='účastníci soustředění',
|
||||||
help_text='Seznam účastníků soustředění', through='Soustredeni_Ucastnici')
|
help_text='Seznam účastníků soustředění', through='Soustredeni_Ucastnici')
|
||||||
|
|
||||||
organizatori = models.ManyToManyField(pm.Organizator,
|
organizatori = models.ManyToManyField(Organizator,
|
||||||
verbose_name='Organizátoři soustředění',
|
verbose_name='Organizátoři soustředění',
|
||||||
help_text='Seznam organizátorů soustředění',
|
help_text='Seznam organizátorů soustředění',
|
||||||
through='Soustredeni_Organizatori')
|
through='Soustredeni_Organizatori')
|
||||||
|
@ -91,7 +91,7 @@ class Soustredeni_Ucastnici(SeminarModelBase):
|
||||||
# Interní ID
|
# Interní ID
|
||||||
id = models.AutoField(primary_key = True)
|
id = models.AutoField(primary_key = True)
|
||||||
|
|
||||||
resitel = models.ForeignKey(pm.Resitel, verbose_name='řešitel', on_delete=models.PROTECT)
|
resitel = models.ForeignKey(Resitel, verbose_name='řešitel', on_delete=models.PROTECT)
|
||||||
|
|
||||||
soustredeni = models.ForeignKey(Soustredeni, verbose_name='soustředění',
|
soustredeni = models.ForeignKey(Soustredeni, verbose_name='soustředění',
|
||||||
on_delete=models.PROTECT)
|
on_delete=models.PROTECT)
|
||||||
|
@ -117,7 +117,7 @@ class Soustredeni_Organizatori(SeminarModelBase):
|
||||||
# Interní ID
|
# Interní ID
|
||||||
id = models.AutoField(primary_key = True)
|
id = models.AutoField(primary_key = True)
|
||||||
|
|
||||||
organizator = models.ForeignKey(pm.Organizator, verbose_name='organizátor',
|
organizator = models.ForeignKey(Organizator, verbose_name='organizátor',
|
||||||
on_delete=models.PROTECT)
|
on_delete=models.PROTECT)
|
||||||
|
|
||||||
soustredeni = models.ForeignKey(Soustredeni, verbose_name='soustředění',
|
soustredeni = models.ForeignKey(Soustredeni, verbose_name='soustředění',
|
||||||
|
@ -162,7 +162,7 @@ class Konfera(Problem):
|
||||||
help_text='Abstrakt konfery tak, jak byl uveden ve sborníku')
|
help_text='Abstrakt konfery tak, jak byl uveden ve sborníku')
|
||||||
|
|
||||||
# FIXME: Umíme omezit jen na účastníky daného soustřeďka?
|
# FIXME: Umíme omezit jen na účastníky daného soustřeďka?
|
||||||
ucastnici = models.ManyToManyField(pm.Resitel, verbose_name='účastníci konfery',
|
ucastnici = models.ManyToManyField(Resitel, verbose_name='účastníci konfery',
|
||||||
help_text='Seznam účastníků konfery', through='Konfery_Ucastnici')
|
help_text='Seznam účastníků konfery', through='Konfery_Ucastnici')
|
||||||
|
|
||||||
soustredeni = models.ForeignKey(Soustredeni, verbose_name='soustředění',
|
soustredeni = models.ForeignKey(Soustredeni, verbose_name='soustředění',
|
||||||
|
@ -203,7 +203,7 @@ class Konfery_Ucastnici(models.Model):
|
||||||
# Interní ID
|
# Interní ID
|
||||||
id = models.AutoField(primary_key = True)
|
id = models.AutoField(primary_key = True)
|
||||||
|
|
||||||
resitel = models.ForeignKey(pm.Resitel, verbose_name='řešitel', on_delete=models.PROTECT)
|
resitel = models.ForeignKey(Resitel, verbose_name='řešitel', on_delete=models.PROTECT)
|
||||||
|
|
||||||
konfera = models.ForeignKey(Konfera, verbose_name='konfera', on_delete=models.CASCADE)
|
konfera = models.ForeignKey(Konfera, verbose_name='konfera', on_delete=models.CASCADE)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,8 @@ from unidecode import unidecode # Používám pro získání ID odkazu (ještě
|
||||||
|
|
||||||
from polymorphic.models import PolymorphicModel
|
from polymorphic.models import PolymorphicModel
|
||||||
|
|
||||||
from . import personalni as pm, Reseni
|
from .odevzdavatko import Reseni
|
||||||
|
from personalni.models import Organizator
|
||||||
|
|
||||||
from .pomocne import Text
|
from .pomocne import Text
|
||||||
|
|
||||||
|
@ -165,7 +166,7 @@ class OrgTextNode(TreeNode):
|
||||||
verbose_name = 'Organizátorský článek (Node)'
|
verbose_name = 'Organizátorský článek (Node)'
|
||||||
verbose_name_plural = 'Organizátorské články (Node)'
|
verbose_name_plural = 'Organizátorské články (Node)'
|
||||||
|
|
||||||
organizator = models.ForeignKey(pm.Organizator,
|
organizator = models.ForeignKey(Organizator,
|
||||||
null=False,
|
null=False,
|
||||||
blank=False,
|
blank=False,
|
||||||
on_delete=models.DO_NOTHING,
|
on_delete=models.DO_NOTHING,
|
||||||
|
|
|
@ -31,7 +31,7 @@ from polymorphic.models import PolymorphicModel
|
||||||
|
|
||||||
from django.core.mail import EmailMessage
|
from django.core.mail import EmailMessage
|
||||||
|
|
||||||
from . import personalni as pm
|
from personalni.models import Prijemce, Organizator
|
||||||
|
|
||||||
from .base import SeminarModelBase
|
from .base import SeminarModelBase
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ class Cislo(SeminarModelBase):
|
||||||
resitele_vsichni.filter(zasilat_cislo_papirove=True))
|
resitele_vsichni.filter(zasilat_cislo_papirove=True))
|
||||||
|
|
||||||
paticka_prijemce = "---\nPokud tyto e-maily nechcete nadále dostávat, prosíme, ozvěte se nám na mam@matfyz.cz."
|
paticka_prijemce = "---\nPokud tyto e-maily nechcete nadále dostávat, prosíme, ozvěte se nám na mam@matfyz.cz."
|
||||||
posli(predmet, text_mailu + paticka_prijemce, pm.Prijemce.objects.filter(zasilat_cislo_emailem=True))
|
posli(predmet, text_mailu + paticka_prijemce, Prijemce.objects.filter(zasilat_cislo_emailem=True))
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
@ -461,15 +461,15 @@ class Problem(SeminarModelBase,PolymorphicModel):
|
||||||
poznamka = models.TextField('org poznámky (HTML)', blank=True,
|
poznamka = models.TextField('org poznámky (HTML)', blank=True,
|
||||||
help_text='Neveřejný návrh úlohy, návrh řešení, text zadání, poznámky ...')
|
help_text='Neveřejný návrh úlohy, návrh řešení, text zadání, poznámky ...')
|
||||||
|
|
||||||
autor = models.ForeignKey(pm.Organizator, verbose_name='autor problému',
|
autor = models.ForeignKey(Organizator, verbose_name='autor problému',
|
||||||
related_name='autor_problemu_%(class)s', null=True, blank=True,
|
related_name='autor_problemu_%(class)s', null=True, blank=True,
|
||||||
on_delete=models.SET_NULL)
|
on_delete=models.SET_NULL)
|
||||||
|
|
||||||
garant = models.ForeignKey(pm.Organizator, verbose_name='garant zadaného problému',
|
garant = models.ForeignKey(Organizator, verbose_name='garant zadaného problému',
|
||||||
related_name='garant_problemu_%(class)s', null=True, blank=True,
|
related_name='garant_problemu_%(class)s', null=True, blank=True,
|
||||||
on_delete=models.SET_NULL)
|
on_delete=models.SET_NULL)
|
||||||
|
|
||||||
opravovatele = models.ManyToManyField(pm.Organizator, verbose_name='opravovatelé',
|
opravovatele = models.ManyToManyField(Organizator, verbose_name='opravovatelé',
|
||||||
blank=True, related_name='opravovatele_%(class)s')
|
blank=True, related_name='opravovatele_%(class)s')
|
||||||
|
|
||||||
kod = models.CharField('lokální kód', max_length=32, blank=True, default='',
|
kod = models.CharField('lokální kód', max_length=32, blank=True, default='',
|
||||||
|
@ -693,7 +693,7 @@ class Pohadka(SeminarModelBase):
|
||||||
id = models.AutoField(primary_key=True)
|
id = models.AutoField(primary_key=True)
|
||||||
|
|
||||||
autor = models.ForeignKey(
|
autor = models.ForeignKey(
|
||||||
pm.Organizator,
|
Organizator,
|
||||||
verbose_name="Autor pohádky",
|
verbose_name="Autor pohádky",
|
||||||
|
|
||||||
# Při nahrávání z TeXu není vyplnění vyžadováno, v adminu je
|
# Při nahrávání z TeXu není vyplnění vyžadováno, v adminu je
|
||||||
|
|
|
@ -12,7 +12,7 @@ import unidecode
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from korektury.testutils import create_test_pdf
|
from korektury.testutils import create_test_pdf
|
||||||
from seminar.models.personalni import *
|
from personalni.models import *
|
||||||
from seminar.models.tvorba import *
|
from seminar.models.tvorba import *
|
||||||
from seminar.models.odevzdavatko import *
|
from seminar.models.odevzdavatko import *
|
||||||
from seminar.models.soustredeni import *
|
from seminar.models.soustredeni import *
|
||||||
|
|
|
@ -16,7 +16,7 @@ from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from seminar.models.personalni import Organizator, Resitel, Skola, Prijemce
|
from personalni.models import Organizator, Resitel, Skola, Prijemce
|
||||||
from seminar.models.tvorba import Clanek, Rocnik
|
from seminar.models.tvorba import Clanek, Rocnik
|
||||||
from seminar.models.treenode import CisloNode
|
from seminar.models.treenode import CisloNode
|
||||||
from seminar.models.soustredeni import Konfery_Ucastnici, Soustredeni_Ucastnici
|
from seminar.models.soustredeni import Konfery_Ucastnici, Soustredeni_Ucastnici
|
||||||
|
|
|
@ -10,7 +10,7 @@ from django.views.generic.base import RedirectView
|
||||||
from django.core.exceptions import PermissionDenied
|
from django.core.exceptions import PermissionDenied
|
||||||
|
|
||||||
from seminar.models.tvorba import Rocnik, Cislo, Nastaveni, Deadline, Problem, Tema, Clanek
|
from seminar.models.tvorba import Rocnik, Cislo, Nastaveni, Deadline, Problem, Tema, Clanek
|
||||||
from seminar.models.personalni import Resitel, Organizator
|
from personalni.models import Resitel, Organizator
|
||||||
from seminar.models.novinky import Novinky
|
from seminar.models.novinky import Novinky
|
||||||
#from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva
|
#from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva
|
||||||
from seminar import utils
|
from seminar import utils
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.views import generic
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.staticfiles.finders import find
|
from django.contrib.staticfiles.finders import find
|
||||||
from seminar.models.soustredeni import *
|
from seminar.models.soustredeni import *
|
||||||
from seminar.models.personalni import Resitel
|
from personalni.models import Resitel
|
||||||
from seminar.models.tvorba import Nastaveni
|
from seminar.models.tvorba import Nastaveni
|
||||||
import csv
|
import csv
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from django.views.generic import FormView, ListView
|
from django.views.generic import FormView, ListView
|
||||||
|
|
||||||
from seminar.models.personalni import Osoba
|
from personalni.models import Osoba
|
||||||
from seminar.views import formularOKView
|
from seminar.views import formularOKView
|
||||||
from .forms import UcastnikVyrociForm
|
from .forms import UcastnikVyrociForm
|
||||||
from .models import UcastnikVyroci
|
from .models import UcastnikVyroci
|
||||||
|
|
|
@ -4,7 +4,7 @@ from typing import Union, Iterable # TODO: s pythonem 3.10 přepsat na '|'
|
||||||
|
|
||||||
from seminar.models.tvorba import Rocnik, Cislo, Deadline, Problem, Clanek
|
from seminar.models.tvorba import Rocnik, Cislo, Deadline, Problem, Clanek
|
||||||
from seminar.models.odevzdavatko import Hodnoceni
|
from seminar.models.odevzdavatko import Hodnoceni
|
||||||
from seminar.models.personalni import Resitel
|
from personalni.models import Resitel
|
||||||
from seminar.models.soustredeni import Konfera
|
from seminar.models.soustredeni import Konfera
|
||||||
from django.db.models import Q, Sum
|
from django.db.models import Q, Sum
|
||||||
from seminar.utils import resi_v_rocniku
|
from seminar.utils import resi_v_rocniku
|
||||||
|
|
Loading…
Reference in a new issue