from __future__ import unicode_literals
from django . db import models , migrations
import django_countries . fields
from odevzdavatko . models import generate_filename
import django . utils . timezone
from django . conf import settings
class Migration ( migrations . Migration ) :
dependencies = [
migrations . swappable_dependency ( settings . AUTH_USER_MODEL ) ,
]
operations = [
migrations . CreateModel (
name = ' VysledkyKCislu ' ,
fields = [
( ' dummy_id ' , models . CharField ( max_length = 32 , serialize = False , verbose_name = ' dummy ID pro view ' , primary_key = True , db_column = ' id ' ) ) ,
( ' body ' , models . IntegerField ( verbose_name = ' body za \u010d \xed slo ' , db_column = ' body ' ) ) ,
( ' body_celkem ' , models . IntegerField ( verbose_name = ' body celkem do \u010d \xed sla ' , db_column = ' body_celkem ' ) ) ,
] ,
options = {
' abstract ' : False ,
' db_table ' : ' seminar_body_k_cislu ' ,
' managed ' : False ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' VysledkyZaCislo ' ,
fields = [
( ' dummy_id ' , models . CharField ( max_length = 32 , serialize = False , verbose_name = ' dummy ID pro view ' , primary_key = True , db_column = ' id ' ) ) ,
( ' body ' , models . IntegerField ( verbose_name = ' body za \u010d \xed slo ' , db_column = ' body ' ) ) ,
] ,
options = {
' abstract ' : False ,
' db_table ' : ' seminar_body_za_cislo ' ,
' managed ' : False ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Cislo ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' cislo ' , models . CharField ( help_text = ' V \u011b t \u0161 inou jen " 1 " , vyj \xed me \u010d n \u011b " 7-8 " , lexikograficky ur \u010d ije po \u0159 ad \xed v ro \u010d n \xed ku! ' , max_length = 32 , verbose_name = ' n \xe1 zev \u010d \xed sla ' ) ) ,
( ' datum_vydani ' , models . DateField ( help_text = ' Datum vyd \xe1 n \xed fin \xe1 ln \xed verze ' , null = True , verbose_name = ' datum vyd \xe1 n \xed ' , blank = True ) ) ,
( ' datum_deadline ' , models . DateField ( help_text = ' Datum pro p \u0159 \xed jem \u0159 e \u0161 en \xed \xfa loh zadan \xfd ch v tomto \u010d \xed sle ' , null = True , verbose_name = ' datum deadline ' , blank = True ) ) ,
( ' verejne_db ' , models . BooleanField ( default = False , verbose_name = ' \u010d \xed slo zve \u0159 ejn \u011b no ' , db_column = ' verejne ' ) ) ,
] ,
options = {
' ordering ' : [ ' rocnik__rocnik ' , ' cislo ' ] ,
' db_table ' : ' seminar_cisla ' ,
' verbose_name ' : ' \u010c \xed slo ' ,
' verbose_name_plural ' : ' \u010c \xed sla ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Nastaveni ' ,
fields = [
( ' id ' , models . AutoField ( verbose_name = ' ID ' , serialize = False , auto_created = True , primary_key = True ) ) ,
( ' aktualni_cislo ' , models . ForeignKey ( verbose_name = ' posledn \xed vydan \xe9 \u010d \xed slo ' , to = ' seminar.Cislo ' , on_delete = models . CASCADE ) ) ,
] ,
options = {
' db_table ' : ' seminar_nastaveni ' ,
' verbose_name ' : ' Nastaven \xed semin \xe1 \u0159 e ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' PrilohaReseni ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' timestamp ' , models . DateTimeField ( auto_now = True , verbose_name = ' vytvo \u0159 eno ' ) ) ,
( ' soubor ' , models . FileField ( upload_to = generate_filename , verbose_name = ' soubor ' ) ) ,
( ' poznamka ' , models . TextField ( help_text = ' Neve \u0159 ejn \xe1 pozn \xe1 mka k p \u0159 \xed loze \u0159 e \u0161 en \xed (plain text), nap \u0159 . o p \u016f vodu ' , verbose_name = ' neve \u0159 ejn \xe1 pozn \xe1 mka ' , blank = True ) ) ,
] ,
options = {
' ordering ' : [ ' reseni ' , ' timestamp ' ] ,
' db_table ' : ' seminar_priloha_reseni ' ,
' verbose_name ' : ' P \u0159 \xed loha \u0159 e \u0161 en \xed ' ,
' verbose_name_plural ' : ' P \u0159 \xed lohy \u0159 e \u0161 en \xed ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Problem ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' nazev ' , models . CharField ( max_length = 256 , verbose_name = ' n \xe1 zev ' ) ) ,
( ' typ ' , models . CharField ( default = b ' uloha ' , max_length = 32 , verbose_name = ' typ probl \xe9 mu ' , choices = [ ( b ' uloha ' , ' \xda loha ' ) , ( b ' tema ' , ' T \xe9 ma ' ) , ( b ' serial ' , ' Seri \xe1 l ' ) , ( b ' org-clanek ' , ' Organiz \xe1 torsk \xfd \u010d l \xe1 nek ' ) , ( b ' res-clanek ' , ' \u0158 esitelsk \xfd \u010d l \xe1 nek ' ) ] ) ) ,
( ' stav ' , models . CharField ( default = b ' navrh ' , max_length = 32 , verbose_name = ' stav probl \xe9 mu ' , choices = [ ( b ' navrh ' , ' N \xe1 vrh ' ) , ( b ' zadany ' , ' Zadan \xfd ' ) , ( b ' smazany ' , ' Smazan \xfd ' ) ] ) ) ,
( ' text_problemu_org ' , models . TextField ( verbose_name = ' organiz \xe1 torsk \xfd (neve \u0159 ejn \xfd ) text ' , blank = True ) ) ,
( ' text_problemu ' , models . TextField ( verbose_name = ' ve \u0159 ejn \xfd text zad \xe1 n \xed a \u0159 e \u0161 en \xed ' , blank = True ) ) ,
( ' kod ' , models . CharField ( default = b ' ' , help_text = ' \u010c \xed slo/k \xf3 d \xfa lohy v \u010d \xed sle nebo k \xf3 d t \xe9 matu/ \u010d l \xe1 nku/seri \xe1 lu v ro \u010d n \xed ku ' , max_length = 32 , verbose_name = ' lok \xe1 ln \xed k \xf3 d ' , blank = True ) ) ,
( ' body ' , models . IntegerField ( null = True , verbose_name = ' maximum bod \u016f ' , blank = True ) ) ,
( ' autor ' , models . ForeignKey ( related_name = ' autor_uloh ' , verbose_name = ' autor probl \xe9 mu ' , to = settings . AUTH_USER_MODEL , on_delete = models . CASCADE ) ) ,
( ' cislo_reseni ' , models . ForeignKey ( related_name = ' resene_problemy ' , blank = True , to = ' seminar.Cislo ' , help_text = ' \u010c \xed slo s \u0159 e \u0161 en \xed m \xfa lohy, jen pro \xfa lohy ' , null = True , verbose_name = ' \u010d \xed slo \u0159 e \u0161 en \xed ' , on_delete = models . CASCADE ) ) ,
( ' cislo_zadani ' , models . ForeignKey ( related_name = ' zadane_problemy ' , verbose_name = ' \u010d \xed slo zad \xe1 n \xed ' , blank = True , to = ' seminar.Cislo ' , null = True , on_delete = models . CASCADE ) ) ,
( ' opravovatel ' , models . ForeignKey ( related_name = ' opravovatel_uloh ' , verbose_name = ' opravovatel ' , blank = True , to = settings . AUTH_USER_MODEL , null = True , on_delete = models . CASCADE ) ) ,
] ,
options = {
' db_table ' : ' seminar_problemy ' ,
' verbose_name ' : ' Probl \xe9 m ' ,
' verbose_name_plural ' : ' Probl \xe9 my ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Reseni ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' body ' , models . IntegerField ( null = True , verbose_name = ' body ' , blank = True ) ) ,
( ' timestamp ' , models . DateTimeField ( auto_now = True , verbose_name = ' vytvo \u0159 eno ' ) ) ,
( ' poznamka ' , models . TextField ( help_text = ' Neve \u0159 ejn \xe1 pozn \xe1 mka k \u0159 e \u0161 en \xed (plain text) ' , verbose_name = ' neve \u0159 ejn \xe1 pozn \xe1 mka ' , blank = True ) ) ,
( ' cislo_body ' , models . ForeignKey ( related_name = ' bodovana_reseni ' , verbose_name = ' \u010d \xed slo pro body ' , blank = True , to = ' seminar.Cislo ' , null = True , on_delete = models . CASCADE ) ) ,
( ' problem ' , models . ForeignKey ( related_name = ' reseni ' , verbose_name = ' probl \xe9 m ' , to = ' seminar.Problem ' , on_delete = models . CASCADE ) ) ,
] ,
options = {
' ordering ' : [ ' problem ' , ' resitel ' ] ,
' db_table ' : ' seminar_reseni ' ,
' verbose_name ' : ' \u0158 e \u0161 en \xed ' ,
' verbose_name_plural ' : ' \u0158 e \u0161 en \xed ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Resitel ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' jmeno ' , models . CharField ( max_length = 256 , verbose_name = ' jm \xe9 no ' ) ) ,
( ' prijmeni ' , models . CharField ( max_length = 256 , verbose_name = ' p \u0159 \xed jmen \xed ' ) ) ,
( ' pohlavi_muz ' , models . BooleanField ( default = False , verbose_name = ' pohlav \xed (mu \u017e ) ' ) ) ,
( ' rok_maturity ' , models . IntegerField ( verbose_name = ' rok maturity ' ) ) ,
( ' email ' , models . EmailField ( default = b ' ' , max_length = 256 , verbose_name = ' e-mail ' , blank = True ) ) ,
( ' telefon ' , models . CharField ( default = b ' ' , max_length = 256 , verbose_name = ' telefon ' , blank = True ) ) ,
( ' datum_narozeni ' , models . DateField ( null = True , verbose_name = ' datum narozen \xed ' , blank = True ) ) ,
( ' datum_souhlasu_udaje ' , models . DateField ( help_text = ' Datum souhlasu se zpracov \xe1 n \xed m osobn \xed ch \xfa daj \u016f ' , null = True , verbose_name = ' datum souhlasu ( \xfa daje) ' , blank = True ) ) ,
( ' datum_souhlasu_zasilani ' , models . DateField ( help_text = ' Datum souhlasu se zas \xed l \xe1 n \xed m MFF materi \xe1 l \u016f ' , null = True , verbose_name = ' datum souhlasu (spam) ' , blank = True ) ) ,
( ' datum_prihlaseni ' , models . DateField ( default = django . utils . timezone . now , verbose_name = ' datum p \u0159 ihl \xe1 \u0161 en \xed ' ) ) ,
( ' zasilat ' , models . CharField ( default = b ' domu ' , max_length = 32 , verbose_name = ' kam zas \xed lat ' , choices = [ ( b ' domu ' , ' Dom \u016f ' ) , ( b ' do_skoly ' , ' Do \u0161 koly ' ) , ( b ' nikam ' , ' Nikam ' ) ] ) ) ,
( ' ulice ' , models . CharField ( default = b ' ' , max_length = 256 , verbose_name = ' ulice ' , blank = True ) ) ,
( ' mesto ' , models . CharField ( default = b ' ' , max_length = 256 , verbose_name = ' m \u011b sto ' , blank = True ) ) ,
( ' psc ' , models . CharField ( default = b ' ' , max_length = 32 , verbose_name = ' PS \u010c ' , blank = True ) ) ,
( ' stat ' , django_countries . fields . CountryField ( default = b ' CZ ' , help_text = ' ISO 3166-1 k \xf3 d zem \u011b velk \xfd mi p \xed smeny (CZ, SK, ...) ' , max_length = 2 , verbose_name = ' st \xe1 t ' ) ) ,
( ' poznamka ' , models . TextField ( help_text = ' Neve \u0159 ejn \xe1 pozn \xe1 mka k \u0159 e \u0161 iteli (plain text) ' , verbose_name = ' neve \u0159 ejn \xe1 pozn \xe1 mka ' , blank = True ) ) ,
] ,
options = {
' ordering ' : [ ' prijmeni ' , ' jmeno ' ] ,
' db_table ' : ' seminar_resitele ' ,
' verbose_name ' : ' \u0158 e \u0161 itel ' ,
' verbose_name_plural ' : ' \u0158 e \u0161 itel \xe9 ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Rocnik ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' prvni_rok ' , models . IntegerField ( verbose_name = ' prvn \xed rok ' ) ) ,
( ' rocnik ' , models . CharField ( max_length = 16 , verbose_name = ' \u010d \xed slo ro \u010d n \xed ku ' ) ) ,
] ,
options = {
' ordering ' : [ ' rocnik ' ] ,
' db_table ' : ' seminar_rocniky ' ,
' verbose_name ' : ' Ro \u010d n \xed k ' ,
' verbose_name_plural ' : ' Ro \u010d n \xed ky ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Skola ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' aesop_id ' , models . CharField ( default = b ' ' , help_text = ' Aesopi ID typu " izo:... " nebo " aesop:... " ' , max_length = 32 , verbose_name = ' Aesop ID ' , blank = True ) ) ,
( ' izo ' , models . CharField ( help_text = ' IZO \u0161 koly (jen \u010d esk \xe9 \u0161 koly) ' , max_length = 32 , verbose_name = ' IZO ' , blank = True ) ) ,
( ' nazev ' , models . CharField ( help_text = ' Cel \xfd n \xe1 zev \u0161 koly ' , max_length = 256 , verbose_name = ' n \xe1 zev ' ) ) ,
( ' kratky_nazev ' , models . CharField ( help_text = b ' Zkr \xc3 \xa1 cen \xc3 \xbd n \xc3 \xa1 zev pro zobrazen \xc3 \xad ve v \xc3 \xbd sledkovce ' , max_length = 256 , verbose_name = ' zkr \xe1 cen \xfd n \xe1 zev ' , blank = True ) ) ,
( ' ulice ' , models . CharField ( max_length = 256 , verbose_name = ' ulice ' ) ) ,
( ' mesto ' , models . CharField ( max_length = 256 , verbose_name = ' m \u011b sto ' ) ) ,
( ' psc ' , models . CharField ( max_length = 32 , verbose_name = ' PS \u010c ' ) ) ,
( ' stat ' , django_countries . fields . CountryField ( default = b ' CZ ' , help_text = ' ISO 3166-1 k \xf3 d zeme velk \xfd mi p \xed smeny (CZ, SK, ...) ' , max_length = 2 , verbose_name = ' st \xe1 t ' ) ) ,
( ' poznamka ' , models . TextField ( help_text = ' Neve \u0159 ejn \xe1 pozn \xe1 mka ke \u0161 kole (plain text) ' , verbose_name = ' neve \u0159 ejn \xe1 pozn \xe1 mka ' , blank = True ) ) ,
] ,
options = {
' db_table ' : ' seminar_skoly ' ,
' verbose_name ' : ' \u0160 kola ' ,
' verbose_name_plural ' : ' \u0160 koly ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . CreateModel (
name = ' Soustredeni ' ,
fields = [
( ' id ' , models . AutoField ( serialize = False , primary_key = True ) ) ,
( ' datum_zacatku ' , models . DateField ( help_text = ' Prvn \xed den soust \u0159 ed \u011b n \xed ' , null = True , verbose_name = ' datum za \u010d \xe1 tku ' , blank = True ) ) ,
( ' datum_konce ' , models . DateField ( help_text = ' Posledn \xed den soust \u0159 ed \u011b n \xed ' , null = True , verbose_name = ' datum konce ' , blank = True ) ) ,
( ' verejne_db ' , models . BooleanField ( default = False , verbose_name = ' soust \u0159 ed \u011b n \xed zve \u0159 ejn \u011b no ' , db_column = ' verejne ' ) ) ,
( ' misto ' , models . CharField ( default = b ' ' , help_text = ' M \xed sto (n \xe1 zev obce, voliteln \u011b t \xe9 \u017e objektu ' , max_length = 256 , verbose_name = ' m \xed sto soust \u0159 ed \u011b n \xed ' , blank = True ) ) ,
( ' rocnik ' , models . ForeignKey ( related_name = ' soustredeni ' , verbose_name = ' ro \u010d n \xed k ' , to = ' seminar.Rocnik ' , on_delete = models . CASCADE ) ) ,
( ' ucastnici ' , models . ManyToManyField ( help_text = ' Seznam \xfa \u010d astn \xed k \u016f soust \u0159 ed \u011b n \xed ' , to = ' seminar.Resitel ' , db_table = ' seminar_soustredeni_ucastnici ' , verbose_name = ' \xfa \u010d astn \xed ci soust \u0159 ed \u011b n \xed ' ) ) ,
] ,
options = {
' ordering ' : [ ' rocnik__rocnik ' , ' datum_zacatku ' ] ,
' db_table ' : ' seminar_soustredeni ' ,
' verbose_name ' : ' Soust \u0159 ed \u011b n \xed ' ,
' verbose_name_plural ' : ' Soust \u0159 ed \u011b n \xed ' ,
} ,
bases = ( models . Model , ) ,
) ,
migrations . AddField (
model_name = ' resitel ' ,
name = ' skola ' ,
field = models . ForeignKey ( verbose_name = ' \u0161 kola ' , blank = True , to = ' seminar.Skola ' , null = True , on_delete = models . CASCADE ) ,
preserve_default = True ,
) ,
migrations . AddField (
model_name = ' resitel ' ,
name = ' user ' ,
field = models . OneToOneField ( null = True , blank = True , to = settings . AUTH_USER_MODEL , verbose_name = ' u \u017e ivatel ' , on_delete = models . CASCADE ) ,
preserve_default = True ,
) ,
migrations . AddField (
model_name = ' reseni ' ,
name = ' resitel ' ,
field = models . ForeignKey ( related_name = ' reseni ' , verbose_name = ' \u0159 e \u0161 itel ' , to = ' seminar.Resitel ' , on_delete = models . CASCADE ) ,
preserve_default = True ,
) ,
migrations . AddField (
model_name = ' prilohareseni ' ,
name = ' reseni ' ,
field = models . ForeignKey ( related_name = ' prilohy ' , verbose_name = ' \u0159 e \u0161 en \xed ' , to = ' seminar.Reseni ' , on_delete = models . CASCADE ) ,
preserve_default = True ,
) ,
migrations . AddField (
model_name = ' nastaveni ' ,
name = ' aktualni_rocnik ' ,
field = models . ForeignKey ( verbose_name = ' aktu \xe1 ln \xed ro \u010d n \xed k ' , to = ' seminar.Rocnik ' , on_delete = models . CASCADE ) ,
preserve_default = True ,
) ,
migrations . AddField (
model_name = ' cislo ' ,
name = ' rocnik ' ,
field = models . ForeignKey ( related_name = ' cisla ' , verbose_name = ' ro \u010d n \xed k ' , to = ' seminar.Rocnik ' , on_delete = models . CASCADE ) ,
preserve_default = True ,
) ,
]