Merge branch 'python3' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into python3
This commit is contained in:
commit
04a53b901c
5 changed files with 699 additions and 23 deletions
|
@ -18,9 +18,9 @@ class Migration(migrations.Migration):
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='VysledkyKCislu',
|
name='VysledkyKCislu',
|
||||||
fields=[
|
fields=[
|
||||||
('dummy_id', models.CharField(max_length=32, serialize=False, verbose_name='dummy ID pro view', primary_key=True, db_column=b'id')),
|
('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\xedslo', db_column=b'body')),
|
('body', models.IntegerField(verbose_name='body za \u010d\xedslo', db_column='body')),
|
||||||
('body_celkem', models.IntegerField(verbose_name='body celkem do \u010d\xedsla', db_column=b'body_celkem')),
|
('body_celkem', models.IntegerField(verbose_name='body celkem do \u010d\xedsla', db_column='body_celkem')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'abstract': False,
|
||||||
|
@ -32,8 +32,8 @@ class Migration(migrations.Migration):
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='VysledkyZaCislo',
|
name='VysledkyZaCislo',
|
||||||
fields=[
|
fields=[
|
||||||
('dummy_id', models.CharField(max_length=32, serialize=False, verbose_name='dummy ID pro view', primary_key=True, db_column=b'id')),
|
('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\xedslo', db_column=b'body')),
|
('body', models.IntegerField(verbose_name='body za \u010d\xedslo', db_column='body')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
'abstract': False,
|
||||||
|
@ -49,7 +49,7 @@ class Migration(migrations.Migration):
|
||||||
('cislo', models.CharField(help_text='V\u011bt\u0161inou jen "1", vyj\xedme\u010dn\u011b "7-8", lexikograficky ur\u010dije po\u0159ad\xed v ro\u010dn\xedku!', max_length=32, verbose_name='n\xe1zev \u010d\xedsla')),
|
('cislo', models.CharField(help_text='V\u011bt\u0161inou jen "1", vyj\xedme\u010dn\u011b "7-8", lexikograficky ur\u010dije po\u0159ad\xed v ro\u010dn\xedku!', max_length=32, verbose_name='n\xe1zev \u010d\xedsla')),
|
||||||
('datum_vydani', models.DateField(help_text='Datum vyd\xe1n\xed fin\xe1ln\xed verze', null=True, verbose_name='datum vyd\xe1n\xed', blank=True)),
|
('datum_vydani', models.DateField(help_text='Datum vyd\xe1n\xed fin\xe1ln\xed verze', null=True, verbose_name='datum vyd\xe1n\xed', blank=True)),
|
||||||
('datum_deadline', models.DateField(help_text='Datum pro p\u0159\xedjem \u0159e\u0161en\xed \xfaloh zadan\xfdch v tomto \u010d\xedsle', null=True, verbose_name='datum deadline', blank=True)),
|
('datum_deadline', models.DateField(help_text='Datum pro p\u0159\xedjem \u0159e\u0161en\xed \xfaloh zadan\xfdch v tomto \u010d\xedsle', null=True, verbose_name='datum deadline', blank=True)),
|
||||||
('verejne_db', models.BooleanField(default=False, verbose_name='\u010d\xedslo zve\u0159ejn\u011bno', db_column=b'verejne')),
|
('verejne_db', models.BooleanField(default=False, verbose_name='\u010d\xedslo zve\u0159ejn\u011bno', db_column='verejne')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'ordering': ['rocnik__rocnik', 'cislo'],
|
'ordering': ['rocnik__rocnik', 'cislo'],
|
||||||
|
@ -199,10 +199,10 @@ class Migration(migrations.Migration):
|
||||||
('id', models.AutoField(serialize=False, primary_key=True)),
|
('id', models.AutoField(serialize=False, primary_key=True)),
|
||||||
('datum_zacatku', models.DateField(help_text='Prvn\xed den soust\u0159ed\u011bn\xed', null=True, verbose_name='datum za\u010d\xe1tku', blank=True)),
|
('datum_zacatku', models.DateField(help_text='Prvn\xed den soust\u0159ed\u011bn\xed', null=True, verbose_name='datum za\u010d\xe1tku', blank=True)),
|
||||||
('datum_konce', models.DateField(help_text='Posledn\xed den soust\u0159ed\u011bn\xed', null=True, verbose_name='datum konce', blank=True)),
|
('datum_konce', models.DateField(help_text='Posledn\xed den soust\u0159ed\u011bn\xed', null=True, verbose_name='datum konce', blank=True)),
|
||||||
('verejne_db', models.BooleanField(default=False, verbose_name='soust\u0159ed\u011bn\xed zve\u0159ejn\u011bno', db_column=b'verejne')),
|
('verejne_db', models.BooleanField(default=False, verbose_name='soust\u0159ed\u011bn\xed zve\u0159ejn\u011bno', db_column='verejne')),
|
||||||
('misto', models.CharField(default=b'', help_text='M\xedsto (n\xe1zev obce, voliteln\u011b t\xe9\u017e objektu', max_length=256, verbose_name='m\xedsto soust\u0159ed\u011bn\xed', blank=True)),
|
('misto', models.CharField(default=b'', help_text='M\xedsto (n\xe1zev obce, voliteln\u011b t\xe9\u017e objektu', max_length=256, verbose_name='m\xedsto soust\u0159ed\u011bn\xed', blank=True)),
|
||||||
('rocnik', models.ForeignKey(related_name='soustredeni', verbose_name='ro\u010dn\xedk', to='seminar.Rocnik')),
|
('rocnik', models.ForeignKey(related_name='soustredeni', verbose_name='ro\u010dn\xedk', to='seminar.Rocnik')),
|
||||||
('ucastnici', models.ManyToManyField(help_text='Seznam \xfa\u010dastn\xedk\u016f soust\u0159ed\u011bn\xed', to='seminar.Resitel', db_table=b'seminar_soustredeni_ucastnici', verbose_name='\xfa\u010dastn\xedci soust\u0159ed\u011bn\xed')),
|
('ucastnici', models.ManyToManyField(help_text='Seznam \xfa\u010dastn\xedk\u016f soust\u0159ed\u011bn\xed', to='seminar.Resitel', db_table='seminar_soustredeni_ucastnici', verbose_name='\xfa\u010dastn\xedci soust\u0159ed\u011bn\xed')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'ordering': ['rocnik__rocnik', 'datum_zacatku'],
|
'ordering': ['rocnik__rocnik', 'datum_zacatku'],
|
||||||
|
|
|
@ -14,13 +14,13 @@ class Migration(migrations.Migration):
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='rocnik',
|
model_name='rocnik',
|
||||||
name='exportovat',
|
name='exportovat',
|
||||||
field=models.BooleanField(default=False, help_text='Exportuje se jen podle tohoto flagu (ne ve\u0159ejnosti), a to jen \u010d\xedsla s ve\u0159ejnou v\xfdsledkovkou', verbose_name='export do AESOPa', db_column=b'exportovat'),
|
field=models.BooleanField(default=False, help_text='Exportuje se jen podle tohoto flagu (ne ve\u0159ejnosti), a to jen \u010d\xedsla s ve\u0159ejnou v\xfdsledkovkou', verbose_name='export do AESOPa', db_column='exportovat'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='soustredeni',
|
model_name='soustredeni',
|
||||||
name='exportovat',
|
name='exportovat',
|
||||||
field=models.BooleanField(default=False, help_text='Exportuje se jen podle tohoto flagu (ne ve\u0159ejnosti)', verbose_name='export do AESOPa', db_column=b'exportovat'),
|
field=models.BooleanField(default=False, help_text='Exportuje se jen podle tohoto flagu (ne ve\u0159ejnosti)', verbose_name='export do AESOPa', db_column='exportovat'),
|
||||||
preserve_default=True,
|
preserve_default=True,
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
|
|
497
seminar/migrations/0049_auto_20190430_2354.py
Normal file
497
seminar/migrations/0049_auto_20190430_2354.py
Normal file
|
@ -0,0 +1,497 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.20 on 2019-04-30 21:54
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import django.utils.timezone
|
||||||
|
import django_countries.fields
|
||||||
|
import imagekit.models.fields
|
||||||
|
import taggit.managers
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('seminar', '0048_add_cislo_datum_deadline_soustredeni'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Clanek',
|
||||||
|
fields=[
|
||||||
|
('problem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='seminar.Problem')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Článek',
|
||||||
|
'verbose_name_plural': 'Články',
|
||||||
|
'db_table': 'seminar_clanky',
|
||||||
|
},
|
||||||
|
bases=('seminar.problem',),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Hodnoceni',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||||
|
('body', models.DecimalField(decimal_places=1, max_digits=8, verbose_name='body')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Hodnocení',
|
||||||
|
'verbose_name_plural': 'Hodnocení',
|
||||||
|
'db_table': 'seminar_hodnoceni',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Obrazek',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||||
|
('na_web', models.ImageField(blank=True, null=True, upload_to='obrazky/%Y/%m/%d/', verbose_name='obrázek na web')),
|
||||||
|
('do_cisla_barevny', models.FileField(blank=True, help_text='Barevná verze obrázku do čísla', null=True, upload_to='obrazky/%Y/%m/%d/', verbose_name='barevný obrázek do čísla')),
|
||||||
|
('do_cisla_cernobily', models.FileField(blank=True, help_text='Černobílá verze obrázku do čísla', null=True, upload_to='obrazky/%Y/%m/%d/', verbose_name='černobílý obrázek do čísla')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'obrázek',
|
||||||
|
'verbose_name_plural': 'obrázky',
|
||||||
|
'db_table': 'seminar_obrazky',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Osoba',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||||
|
('jmeno', models.CharField(max_length=256, verbose_name='jméno')),
|
||||||
|
('prijmeni', models.CharField(max_length=256, verbose_name='příjmení')),
|
||||||
|
('prezdivka', models.CharField(max_length=256, verbose_name='přezdívka')),
|
||||||
|
('pohlavi_muz', models.BooleanField(default=False, verbose_name='pohlaví (muž)')),
|
||||||
|
('email', models.EmailField(blank=True, default='', max_length=256, verbose_name='e-mail')),
|
||||||
|
('telefon', models.CharField(blank=True, default='', max_length=256, verbose_name='telefon')),
|
||||||
|
('datum_narozeni', models.DateField(blank=True, null=True, verbose_name='datum narození')),
|
||||||
|
('datum_souhlasu_udaje', models.DateField(blank=True, help_text='Datum souhlasu se zpracováním osobních údajů', null=True, verbose_name='datum souhlasu (údaje)')),
|
||||||
|
('datum_souhlasu_zasilani', models.DateField(blank=True, help_text='Datum souhlasu se zasíláním MFF materiálů', null=True, verbose_name='datum souhlasu (spam)')),
|
||||||
|
('datum_registrace', models.DateField(default=django.utils.timezone.now, verbose_name='datum registrace do semináře')),
|
||||||
|
('ulice', models.CharField(blank=True, default='', max_length=256, verbose_name='ulice')),
|
||||||
|
('mesto', models.CharField(blank=True, default='', max_length=256, verbose_name='město')),
|
||||||
|
('psc', models.CharField(blank=True, default='', max_length=32, verbose_name='PSČ')),
|
||||||
|
('stat', django_countries.fields.CountryField(default='CZ', help_text='ISO 3166-1 kód země velkými písmeny (CZ, SK, ...)', max_length=2, verbose_name='stát')),
|
||||||
|
('poznamka', models.TextField(blank=True, help_text='Neveřejná poznámka k osobě (plain text)', verbose_name='neveřejná poznámka')),
|
||||||
|
('foto', imagekit.models.fields.ProcessedImageField(blank=True, help_text='Vlož fotografii osoby o libovolné velikosti', null=True, upload_to='image_osoby/velke/%Y/', verbose_name='Fotografie osoby')),
|
||||||
|
('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='uživatel')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Osoba',
|
||||||
|
'verbose_name_plural': 'Osoby',
|
||||||
|
'db_table': 'seminar_osoby',
|
||||||
|
'ordering': ['prijmeni', 'jmeno'],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Prijemce',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||||
|
('poznamka', models.TextField(blank=True, help_text='Neveřejná poznámka k příemci čísel (plain text)', verbose_name='neveřejná poznámka')),
|
||||||
|
('osoba', models.ForeignKey(help_text='Které osobě či na jakou adresu se mají zasílat čísla', on_delete=django.db.models.deletion.CASCADE, to='seminar.Osoba', verbose_name='komu')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'příjemce',
|
||||||
|
'verbose_name_plural': 'příjemce',
|
||||||
|
'db_table': 'seminar_prijemce',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Reseni_Resitele',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Řešení řešitelů',
|
||||||
|
'verbose_name_plural': 'Řešení řešitelů',
|
||||||
|
'db_table': 'seminar_reseni_resitele',
|
||||||
|
'ordering': ['reseni', 'resitele'],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Tema',
|
||||||
|
fields=[
|
||||||
|
('problem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='seminar.Problem')),
|
||||||
|
('tema_typ', models.CharField(choices=[('tema', 'Téma'), ('serial', 'Seriál')], default='tema', max_length=16, verbose_name='Typ tématu')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Téma',
|
||||||
|
'verbose_name_plural': 'Témata',
|
||||||
|
'db_table': 'seminar_temata',
|
||||||
|
},
|
||||||
|
bases=('seminar.problem',),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Text',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('na_web', models.TextField(blank=True, help_text='Text ke zveřejnění na webu', verbose_name='text na web')),
|
||||||
|
('do_cisla', models.TextField(blank=True, help_text='Text ke zveřejnění v čísle', verbose_name='text do čísla')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'text',
|
||||||
|
'verbose_name_plural': 'texty',
|
||||||
|
'db_table': 'seminar_texty',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Uloha',
|
||||||
|
fields=[
|
||||||
|
('problem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='seminar.Problem')),
|
||||||
|
('max_body', models.DecimalField(blank=True, decimal_places=1, max_digits=8, null=True, verbose_name='maximum bodů')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Úloha',
|
||||||
|
'verbose_name_plural': 'Úlohy',
|
||||||
|
'db_table': 'seminar_ulohy',
|
||||||
|
},
|
||||||
|
bases=('seminar.problem',),
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='novinky',
|
||||||
|
options={'ordering': ['-datum'], 'verbose_name': 'Novinka', 'verbose_name_plural': 'Novinky'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='prilohareseni',
|
||||||
|
options={'ordering': ['reseni', 'vytvoreno'], 'verbose_name': 'Příloha řešení', 'verbose_name_plural': 'Přílohy řešení'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='reseni',
|
||||||
|
options={'ordering': ['-cas_doruceni'], 'verbose_name': 'Řešení', 'verbose_name_plural': 'Řešení'},
|
||||||
|
),
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='resitel',
|
||||||
|
options={'ordering': ['osoba'], 'verbose_name': 'Řešitel', 'verbose_name_plural': 'Řešitelé'},
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='konfera',
|
||||||
|
old_name='org_poznamka',
|
||||||
|
new_name='poznamka',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='pohadka',
|
||||||
|
old_name='timestamp',
|
||||||
|
new_name='vytvoreno',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='prilohareseni',
|
||||||
|
old_name='timestamp',
|
||||||
|
new_name='vytvoreno',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='problem',
|
||||||
|
old_name='text_org',
|
||||||
|
new_name='poznamka',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='problem',
|
||||||
|
old_name='timestamp',
|
||||||
|
new_name='vytvoreno',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='problem',
|
||||||
|
old_name='cislo_zadani',
|
||||||
|
new_name='cislo_zadani_old',
|
||||||
|
),
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='problem',
|
||||||
|
old_name='cislo_reseni',
|
||||||
|
new_name='cislo_reseni_old',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='konfera',
|
||||||
|
name='anotace',
|
||||||
|
field=models.TextField(blank=True, help_text='Popis, o čem bude konfera.', verbose_name='anotace'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='konfera',
|
||||||
|
name='reseni',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='Účastnický přípěvek o konfeře', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='konfery', to='seminar.Reseni', verbose_name='článek ke konfeře'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='organizuje_do',
|
||||||
|
field=models.DateTimeField(blank=True, null=True, verbose_name='Organizuje do'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='organizuje_od',
|
||||||
|
field=models.DateTimeField(default='1900-01-01T00:00:00', verbose_name='Organizuje od'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='skola',
|
||||||
|
field=models.CharField(blank=True, help_text='Škola, např. MFF, VŠCHT, VUT, ... prostě aby se nemuselo psát do studuješkolu, ale jen obor, možnost zobrazit zvlášť', max_length=256, null=True, verbose_name='Škola, kterou studuje'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='vytvoreno',
|
||||||
|
field=models.DateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='Vytvořeno'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='problem',
|
||||||
|
name='garant',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='garant_problemu_problem', to='seminar.Organizator', verbose_name='garant zadaného problému'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='problem',
|
||||||
|
name='nadproblem',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='nadproblem_problem', to='seminar.Problem', verbose_name='nadřazený problém'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='problem',
|
||||||
|
name='opravovatele',
|
||||||
|
field=models.ManyToManyField(blank=True, related_name='opravovatele_problem', to='seminar.Organizator', verbose_name='opravovatelé'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='cas_doruceni',
|
||||||
|
field=models.DateTimeField(blank=True, default=django.utils.timezone.now, verbose_name='čas_doručení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='zverejneno',
|
||||||
|
field=models.BooleanField(default=False, help_text='Udává, zda je řešení zveřejněno', verbose_name='řešení zveřejněno'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='cislo',
|
||||||
|
name='verejna_vysledkovka',
|
||||||
|
field=models.BooleanField(default=False, help_text='Je-li false u veřejného čísla,\t\t\t\t není výsledkovka zatím veřejná.', verbose_name='zveřejněna výsledkovka'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='cislo',
|
||||||
|
name='verejne_db',
|
||||||
|
field=models.BooleanField(db_column='verejne', default=False, verbose_name='číslo zveřejněno'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='konfera',
|
||||||
|
name='typ_prezentace',
|
||||||
|
field=models.CharField(choices=[('veletrh', 'Veletrh (postery)'), ('prezentace', 'Prezentace (přednáška)')], default='veletrh', max_length=16, verbose_name='typ prezentace'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='novinky',
|
||||||
|
name='autor',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seminar.Organizator', verbose_name='Autor novinky'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='novinky',
|
||||||
|
name='obrazek',
|
||||||
|
field=models.ImageField(blank=True, null=True, upload_to='image_novinky/%Y/%m/%d/', verbose_name='Obrázek'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='novinky',
|
||||||
|
name='text',
|
||||||
|
field=models.TextField(blank=True, null=True, verbose_name='Text novinky'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='novinky',
|
||||||
|
name='zverejneno',
|
||||||
|
field=models.BooleanField(default='False', verbose_name='Zveřejněno'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='strucny_popis_organizatora',
|
||||||
|
field=models.TextField(blank=True, null=True, verbose_name='Stručný popis organizátora'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='studuje',
|
||||||
|
field=models.CharField(blank=True, help_text="Např. 'Studuje Obecnou fyziku (Bc.), 3. ročník', 'Vystudovala Diskrétní modely a algoritmy (Mgr.)' nebo 'Přednáší na MFF'", max_length=256, null=True, verbose_name='Studium aj.'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='pohadka',
|
||||||
|
name='autor',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Organizator', verbose_name='Autor pohádky'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='pohadka',
|
||||||
|
name='uloha',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pohadky', to='seminar.Uloha', verbose_name='Úloha'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='problem',
|
||||||
|
name='autor',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='autor_problemu_problem', to='seminar.Organizator', verbose_name='autor problému'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='problem',
|
||||||
|
name='kod',
|
||||||
|
field=models.CharField(blank=True, default='', help_text='Číslo/kód úlohy v čísle nebo kód tématu/článku/seriálu v ročníku', max_length=32, verbose_name='lokální kód'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='problem',
|
||||||
|
name='stav',
|
||||||
|
field=models.CharField(choices=[('navrh', 'Návrh'), ('zadany', 'Zadaný'), ('vyreseny', 'Vyřešený'), ('smazany', 'Smazaný')], default='navrh', max_length=32, verbose_name='stav problému'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='problem',
|
||||||
|
name='zamereni',
|
||||||
|
field=taggit.managers.TaggableManager(blank=True, help_text='Zaměření M/F/I/O problému, příp. další tagy', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='zaměření'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='forma',
|
||||||
|
field=models.CharField(choices=[('papir', 'Papírové řešení'), ('email', 'Emailem'), ('upload', 'Upload přes web')], default='email', max_length=16, verbose_name='forma řešení'),
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='problem',
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='resitel',
|
||||||
|
name='zasilat',
|
||||||
|
field=models.CharField(choices=[('domu', 'Domů'), ('do_skoly', 'Do školy'), ('nikam', 'Nikam')], default='domu', max_length=32, verbose_name='kam zasílat'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='rocnik',
|
||||||
|
name='exportovat',
|
||||||
|
field=models.BooleanField(db_column='exportovat', default=False, help_text='Exportuje se jen podle tohoto flagu (ne veřejnosti), a to jen čísla s veřejnou výsledkovkou', verbose_name='export do AESOPa'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='skola',
|
||||||
|
name='aesop_id',
|
||||||
|
field=models.CharField(blank=True, default='', help_text='Aesopi ID typu "izo:..." nebo "aesop:..."', max_length=32, verbose_name='Aesop ID'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='skola',
|
||||||
|
name='kratky_nazev',
|
||||||
|
field=models.CharField(blank=True, help_text='Zkrácený název pro zobrazení ve výsledkovce', max_length=256, verbose_name='zkrácený název'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='skola',
|
||||||
|
name='stat',
|
||||||
|
field=django_countries.fields.CountryField(default='CZ', help_text='ISO 3166-1 kód země velkými písmeny (CZ, SK, ...)', max_length=2, verbose_name='stát'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soustredeni',
|
||||||
|
name='exportovat',
|
||||||
|
field=models.BooleanField(db_column='exportovat', default=False, help_text='Exportuje se jen podle tohoto flagu (ne veřejnosti)', verbose_name='export do AESOPa'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soustredeni',
|
||||||
|
name='misto',
|
||||||
|
field=models.CharField(blank=True, default='', help_text='Místo (název obce, volitelně též objektu', max_length=256, verbose_name='místo soustředění'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soustredeni',
|
||||||
|
name='text',
|
||||||
|
field=models.TextField(blank=True, default='', verbose_name='text k soustředění (HTML)'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soustredeni',
|
||||||
|
name='typ',
|
||||||
|
field=models.CharField(choices=[('jarni', 'Jarní soustředění'), ('podzimni', 'Podzimní soustředění'), ('vikend', 'Víkendový sraz')], default='podzimni', max_length=16, verbose_name='typ akce'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='soustredeni',
|
||||||
|
name='verejne_db',
|
||||||
|
field=models.BooleanField(db_column='verejne', default=False, verbose_name='soustředění zveřejněno'),
|
||||||
|
),
|
||||||
|
migrations.AlterModelTable(
|
||||||
|
name='problem',
|
||||||
|
table='problem',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='cislo_deadline',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deadlinove_ulohy', to='seminar.Cislo', verbose_name='číslo deadlinu'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='cislo_reseni',
|
||||||
|
field=models.ForeignKey(blank=True, help_text='Číslo s řešením úlohy, jen pro úlohy', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='resene_ulohy', to='seminar.Cislo', verbose_name='číslo řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='cislo_zadani',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='zadane_ulohy', to='seminar.Cislo', verbose_name='číslo zadání'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='vzorak',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='uloha_vzorak_set', to='seminar.Text', verbose_name='vzorové řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='zadani',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='uloha_zadani_set', to='seminar.Text', verbose_name='veřejné zadání'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='tema',
|
||||||
|
name='rocnik',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Rocnik', verbose_name='ročník'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni_resitele',
|
||||||
|
name='reseni',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seminar.Reseni', verbose_name='řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni_resitele',
|
||||||
|
name='resitele',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seminar.Resitel', verbose_name='řešitel'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='obrazek',
|
||||||
|
name='text',
|
||||||
|
field=models.ForeignKey(help_text='text, ve kterém se obrázek vyskytuje', on_delete=django.db.models.deletion.CASCADE, to='seminar.Text', verbose_name='text'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='hodnoceni',
|
||||||
|
name='cislo_body',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hodnoceni', to='seminar.Cislo', verbose_name='číslo pro body'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='hodnoceni',
|
||||||
|
name='problem',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seminar.Problem', verbose_name='problém'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='hodnoceni',
|
||||||
|
name='reseni',
|
||||||
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seminar.Reseni', verbose_name='řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='clanek',
|
||||||
|
name='cislo',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Cislo', verbose_name='číslo'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='osoba',
|
||||||
|
field=models.ForeignKey(help_text='osobní údaje organizátora', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='org', to='seminar.Osoba', verbose_name='osoba'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='resitele',
|
||||||
|
field=models.ManyToManyField(help_text='Seznam autorů řešení', through='seminar.Reseni_Resitele', to='seminar.Resitel', verbose_name='autoři řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='text_cely',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reseni_cely_set', to='seminar.Text', verbose_name='Plná verze textu řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='text_zkraceny',
|
||||||
|
field=models.ManyToManyField(help_text='Seznam úryvků z řešení', related_name='reseni_zkraceny_set', to='seminar.Text', verbose_name='zkrácené verze řešení'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='resitel',
|
||||||
|
name='osoba',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Osoba', verbose_name='osoba'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='skola',
|
||||||
|
name='kontaktni_osoba',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Osoba', verbose_name='Kontaktní osoba'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='problem',
|
||||||
|
field=models.ManyToManyField(help_text='Problém', through='seminar.Hodnoceni', to='seminar.Problem', verbose_name='problém'),
|
||||||
|
),
|
||||||
|
]
|
178
seminar/migrations/0050_auto_20190510_2228.py
Normal file
178
seminar/migrations/0050_auto_20190510_2228.py
Normal file
|
@ -0,0 +1,178 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.20 on 2019-05-10 20:28
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0049_auto_20190430_2354'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='CisloNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Číslo (Node)',
|
||||||
|
'verbose_name_plural': 'Čísla (Node)',
|
||||||
|
'db_table': 'seminar_nodes_cislo',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ClanekNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.ClanekNode', verbose_name='první potomek')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.ClanekNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.ClanekNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Článek (Node)',
|
||||||
|
'verbose_name_plural': 'Články (Node)',
|
||||||
|
'db_table': 'seminar_nodes_clanek',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='KonferaNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.KonferaNode', verbose_name='první potomek')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.KonferaNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.KonferaNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Konfera (Node)',
|
||||||
|
'verbose_name_plural': 'Konfery (Node)',
|
||||||
|
'db_table': 'seminar_nodes_konfera',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MezicisloNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.MezicisloNode', verbose_name='první potomek')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.MezicisloNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.MezicisloNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Mezičíslo (Node)',
|
||||||
|
'verbose_name_plural': 'Mezičísla (Node)',
|
||||||
|
'db_table': 'seminar_nodes_mezicislo',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='RocnikNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.RocnikNode', verbose_name='první potomek')),
|
||||||
|
('rocnik', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='seminar.Rocnik', verbose_name='ročník')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.RocnikNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.RocnikNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Ročník (Node)',
|
||||||
|
'verbose_name_plural': 'Ročníky (Node)',
|
||||||
|
'db_table': 'seminar_nodes_rocnik',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='TemaVCisleNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.TemaVCisleNode', verbose_name='první potomek')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.TemaVCisleNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.TemaVCisleNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
('tema', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='seminar.Tema', verbose_name='téma v čísle')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Téma v čísle (Node)',
|
||||||
|
'verbose_name_plural': 'Témata v čísle (Node)',
|
||||||
|
'db_table': 'seminar_nodes_temavcisle',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='TextNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.TextNode', verbose_name='první potomek')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.TextNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.TextNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
('text', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='seminar.Text', verbose_name='text')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Text (Node)',
|
||||||
|
'verbose_name_plural': 'Text (Node)',
|
||||||
|
'db_table': 'seminar_nodes_obsah',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='UlohaNode',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('first_child', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.UlohaNode', verbose_name='první potomek')),
|
||||||
|
('root', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.UlohaNode', verbose_name='kořen stromu')),
|
||||||
|
('succ', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.UlohaNode', verbose_name='další element na stejné úrovni')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Úloha (Node)',
|
||||||
|
'verbose_name_plural': 'Úlohy (Node)',
|
||||||
|
'db_table': 'seminar_nodes_uloha',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='konfera',
|
||||||
|
name='reseni',
|
||||||
|
field=models.OneToOneField(blank=True, help_text='Účastnický přípěvek o konfeře', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='konfery', to='seminar.Reseni', verbose_name='článek ke konfeře'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='organizator',
|
||||||
|
name='osoba',
|
||||||
|
field=models.OneToOneField(help_text='osobní údaje organizátora', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='org', to='seminar.Osoba', verbose_name='osoba'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='reseni',
|
||||||
|
name='text_cely',
|
||||||
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reseni_cely_set', to='seminar.Text', verbose_name='Plná verze textu řešení'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='resitel',
|
||||||
|
name='osoba',
|
||||||
|
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Osoba', verbose_name='osoba'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='vzorak',
|
||||||
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='uloha_vzorak_set', to='seminar.Text', verbose_name='vzorové řešení'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='uloha',
|
||||||
|
name='zadani',
|
||||||
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='uloha_zadani_set', to='seminar.Text', verbose_name='veřejné zadání'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='cislonode',
|
||||||
|
name='cislo',
|
||||||
|
field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='seminar.Cislo', verbose_name='číslo'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='cislonode',
|
||||||
|
name='first_child',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.CisloNode', verbose_name='první potomek'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='cislonode',
|
||||||
|
name='root',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='potomci_set', to='seminar.CisloNode', verbose_name='kořen stromu'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='cislonode',
|
||||||
|
name='succ',
|
||||||
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='prev', to='seminar.CisloNode', verbose_name='další element na stejné úrovni'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -219,7 +219,7 @@ class Resitel(SeminarModelBase):
|
||||||
# Interní ID
|
# Interní ID
|
||||||
id = models.AutoField(primary_key = True)
|
id = models.AutoField(primary_key = True)
|
||||||
|
|
||||||
osoba = models.ForeignKey(Osoba, blank=False, null=False, verbose_name='osoba')
|
osoba = models.OneToOneField(Osoba, blank=False, null=True, verbose_name='osoba') # FIXME opravit po prvni migraci
|
||||||
|
|
||||||
skola = models.ForeignKey(Skola, blank=True, null=True, verbose_name='škola')
|
skola = models.ForeignKey(Skola, blank=True, null=True, verbose_name='škola')
|
||||||
|
|
||||||
|
@ -457,8 +457,8 @@ class Cislo(SeminarModelBase):
|
||||||
class Organizator(SeminarModelBase):
|
class Organizator(SeminarModelBase):
|
||||||
# zmena dedicnosti z models.Model na SeminarModelBase, potencialni vznik bugu
|
# zmena dedicnosti z models.Model na SeminarModelBase, potencialni vznik bugu
|
||||||
|
|
||||||
osoba = models.ForeignKey(Osoba, verbose_name='osoba', related_name='org',
|
osoba = models.OneToOneField(Osoba, verbose_name='osoba', related_name='org',
|
||||||
help_text='osobní údaje organizátora', null=False, blank=False)
|
help_text='osobní údaje organizátora', null=True, blank=False) #FIXME opravit po migraci
|
||||||
|
|
||||||
vytvoreno = models.DateTimeField(
|
vytvoreno = models.DateTimeField(
|
||||||
'Vytvořeno',
|
'Vytvořeno',
|
||||||
|
@ -467,7 +467,7 @@ class Organizator(SeminarModelBase):
|
||||||
editable=False
|
editable=False
|
||||||
)
|
)
|
||||||
|
|
||||||
organizuje_od = models.DateTimeField('Organizuje od', blank=False, null=False)
|
organizuje_od = models.DateTimeField('Organizuje od', blank=False, null=False, default="1900-01-01T00:00:00")
|
||||||
|
|
||||||
organizuje_do = models.DateTimeField('Organizuje do', blank=True, null=True)
|
organizuje_do = models.DateTimeField('Organizuje do', blank=True, null=True)
|
||||||
|
|
||||||
|
@ -566,6 +566,7 @@ class Problem(SeminarModelBase):
|
||||||
# Není abstraktní, protože se na něj jinak nedají dělat ForeignKeys.
|
# Není abstraktní, protože se na něj jinak nedají dělat ForeignKeys.
|
||||||
# TODO: Udělat to polymorfní (pomocí django-polymorphic), abychom dostali po těch vazbách přímo tu úlohu/témátko vč. fieldů, které nejsou součástí modelu Problem?
|
# TODO: Udělat to polymorfní (pomocí django-polymorphic), abychom dostali po těch vazbách přímo tu úlohu/témátko vč. fieldů, které nejsou součástí modelu Problem?
|
||||||
#abstract = True
|
#abstract = True
|
||||||
|
db_table = 'problem'
|
||||||
verbose_name = 'Problém'
|
verbose_name = 'Problém'
|
||||||
verbose_name_plural = 'Problémy'
|
verbose_name_plural = 'Problémy'
|
||||||
ordering = ['nazev']
|
ordering = ['nazev']
|
||||||
|
@ -662,7 +663,7 @@ class Tema(Problem):
|
||||||
(TEMA_TEMA, 'Téma'),
|
(TEMA_TEMA, 'Téma'),
|
||||||
(TEMA_SERIAL, 'Seriál'),
|
(TEMA_SERIAL, 'Seriál'),
|
||||||
]
|
]
|
||||||
typ = models.CharField('Typ tématu', max_length=16, choices=TEMA_CHOICES, blank=False, default=TEMA_TEMA)
|
tema_typ = models.CharField('Typ tématu', max_length=16, choices=TEMA_CHOICES, blank=False, default=TEMA_TEMA)
|
||||||
|
|
||||||
rocnik = models.ForeignKey(Rocnik, verbose_name='ročník',blank=True, null=True)
|
rocnik = models.ForeignKey(Rocnik, verbose_name='ročník',blank=True, null=True)
|
||||||
|
|
||||||
|
@ -710,9 +711,9 @@ class Uloha(Problem):
|
||||||
verbose_name_plural = 'Úlohy'
|
verbose_name_plural = 'Úlohy'
|
||||||
|
|
||||||
|
|
||||||
zadani = models.ForeignKey(Text, verbose_name='veřejné zadání', related_name="uloha_zadani_set", blank=True, null=True)
|
zadani = models.OneToOneField(Text, verbose_name='veřejné zadání', related_name="uloha_zadani_set", blank=True, null=True)
|
||||||
|
|
||||||
vzorak = models.ForeignKey(Text, verbose_name='vzorové řešení', related_name="uloha_vzorak_set", blank=True, null=True)
|
vzorak = models.OneToOneField(Text, verbose_name='vzorové řešení', related_name="uloha_vzorak_set", blank=True, null=True)
|
||||||
|
|
||||||
|
|
||||||
cislo_zadani = models.ForeignKey(Cislo, verbose_name='číslo zadání', blank=True, null=True, related_name='zadane_ulohy')
|
cislo_zadani = models.ForeignKey(Cislo, verbose_name='číslo zadání', blank=True, null=True, related_name='zadane_ulohy')
|
||||||
|
@ -769,7 +770,7 @@ class Reseni(SeminarModelBase):
|
||||||
forma = models.CharField('forma řešení', max_length=16, choices=FORMA_CHOICES, blank=False,
|
forma = models.CharField('forma řešení', max_length=16, choices=FORMA_CHOICES, blank=False,
|
||||||
default=FORMA_EMAIL)
|
default=FORMA_EMAIL)
|
||||||
|
|
||||||
text_cely = models.ForeignKey(Text, verbose_name='Plná verze textu řešení',
|
text_cely = models.OneToOneField(Text, verbose_name='Plná verze textu řešení',
|
||||||
blank=True, null=True, related_name="reseni_cely_set")
|
blank=True, null=True, related_name="reseni_cely_set")
|
||||||
|
|
||||||
text_zkraceny = models.ManyToManyField(Text, verbose_name='zkrácené verze řešení',
|
text_zkraceny = models.ManyToManyField(Text, verbose_name='zkrácené verze řešení',
|
||||||
|
@ -999,8 +1000,8 @@ class Konfera(models.Model):
|
||||||
|
|
||||||
poznamka = models.TextField('neveřejná poznámka', blank=True,
|
poznamka = models.TextField('neveřejná poznámka', blank=True,
|
||||||
help_text='Neveřejná poznámka ke konfeře(plain text)')
|
help_text='Neveřejná poznámka ke konfeře(plain text)')
|
||||||
|
# Jedno reseni se vztahuje nejvyse k jedne konfere
|
||||||
reseni = models.ForeignKey(Reseni, verbose_name='článek ke konfeře', related_name='konfery',
|
reseni = models.OneToOneField(Reseni, verbose_name='článek ke konfeře', related_name='konfery',
|
||||||
help_text='Účastnický přípěvek o konfeře', on_delete = models.SET_NULL,
|
help_text='Účastnický přípěvek o konfeře', on_delete = models.SET_NULL,
|
||||||
null=True, blank=True)
|
null=True, blank=True)
|
||||||
|
|
||||||
|
@ -1107,7 +1108,7 @@ class TreeNode(models.Model):
|
||||||
blank = True,
|
blank = True,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
verbose_name="první potomek")
|
verbose_name="první potomek")
|
||||||
succ = models.ForeignKey('self',
|
succ = models.OneToOneField('self',
|
||||||
related_name="prev",
|
related_name="prev",
|
||||||
null = True,
|
null = True,
|
||||||
blank = True,
|
blank = True,
|
||||||
|
@ -1119,7 +1120,7 @@ class RocnikNode(TreeNode):
|
||||||
db_table = 'seminar_nodes_rocnik'
|
db_table = 'seminar_nodes_rocnik'
|
||||||
verbose_name = 'Ročník (Node)'
|
verbose_name = 'Ročník (Node)'
|
||||||
verbose_name_plural = 'Ročníky (Node)'
|
verbose_name_plural = 'Ročníky (Node)'
|
||||||
rocnik = models.ForeignKey(Rocnik,
|
rocnik = models.OneToOneField(Rocnik,
|
||||||
on_delete = models.PROTECT, # Pokud chci mazat ročník, musím si Node pořešit ručně
|
on_delete = models.PROTECT, # Pokud chci mazat ročník, musím si Node pořešit ručně
|
||||||
verbose_name = "ročník")
|
verbose_name = "ročník")
|
||||||
|
|
||||||
|
@ -1128,7 +1129,7 @@ class CisloNode(TreeNode):
|
||||||
db_table = 'seminar_nodes_cislo'
|
db_table = 'seminar_nodes_cislo'
|
||||||
verbose_name = 'Číslo (Node)'
|
verbose_name = 'Číslo (Node)'
|
||||||
verbose_name_plural = 'Čísla (Node)'
|
verbose_name_plural = 'Čísla (Node)'
|
||||||
cislo = models.ForeignKey(Cislo,
|
cislo = models.OneToOneField(Cislo,
|
||||||
on_delete = models.PROTECT, # Pokud chci mazat číslo, musím si Node pořešit ručně
|
on_delete = models.PROTECT, # Pokud chci mazat číslo, musím si Node pořešit ručně
|
||||||
verbose_name = "číslo")
|
verbose_name = "číslo")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue