Odmanagovaný seminář
This commit is contained in:
parent
a1c1b9f280
commit
e3ce5efdd6
2 changed files with 39 additions and 1 deletions
|
@ -0,0 +1,33 @@
|
|||
# Generated by Django 4.2.8 on 2024-03-12 20:44
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('seminar', '0117_auto_20240312_2125'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='organizator',
|
||||
options={'managed': False, 'ordering': ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni'], 'verbose_name': 'Organizátor', 'verbose_name_plural': 'Organizátoři'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='osoba',
|
||||
options={'managed': False, 'ordering': ['prijmeni', 'jmeno'], 'verbose_name': 'Osoba', 'verbose_name_plural': 'Osoby'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='prijemce',
|
||||
options={'managed': False, 'verbose_name': 'příjemce', 'verbose_name_plural': 'příjemce'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='resitel',
|
||||
options={'managed': False, 'ordering': ['osoba'], 'verbose_name': 'Řešitel', 'verbose_name_plural': 'Řešitelé'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='skola',
|
||||
options={'managed': False, 'ordering': ['mesto', 'nazev'], 'verbose_name': 'Škola', 'verbose_name_plural': 'Školy'},
|
||||
),
|
||||
]
|
|
@ -25,6 +25,7 @@ class Osoba(SeminarModelBase):
|
|||
verbose_name = 'Osoba'
|
||||
verbose_name_plural = 'Osoby'
|
||||
ordering = ['prijmeni','jmeno']
|
||||
managed = False
|
||||
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
||||
|
@ -128,6 +129,7 @@ class Skola(SeminarModelBase):
|
|||
verbose_name = 'Škola'
|
||||
verbose_name_plural = 'Školy'
|
||||
ordering = ['mesto', 'nazev']
|
||||
managed = False
|
||||
|
||||
# Interní ID
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
@ -180,6 +182,7 @@ class Prijemce(SeminarModelBase):
|
|||
db_table = 'seminar_prijemce'
|
||||
verbose_name = 'příjemce'
|
||||
verbose_name_plural = 'příjemce'
|
||||
managed = False
|
||||
|
||||
|
||||
# Interní ID
|
||||
|
@ -209,6 +212,7 @@ class Resitel(SeminarModelBase):
|
|||
verbose_name = 'Řešitel'
|
||||
verbose_name_plural = 'Řešitelé'
|
||||
ordering = ['osoba']
|
||||
managed = False
|
||||
|
||||
# Interní ID
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
@ -395,7 +399,7 @@ class Resitel(SeminarModelBase):
|
|||
|
||||
@reversion.register(ignore_duplicates=True)
|
||||
class Organizator(SeminarModelBase):
|
||||
osoba = models.OneToOneField(Osoba, verbose_name='osoba', related_name='org',
|
||||
osoba = models.OneToOneField(Osoba, verbose_name='osoba', related_name='org_old',
|
||||
help_text='osobní údaje organizátora', null=False, blank=False,
|
||||
on_delete=models.PROTECT)
|
||||
|
||||
|
@ -445,3 +449,4 @@ class Organizator(SeminarModelBase):
|
|||
# TODO: Zohledňovat přezdívky?
|
||||
# TODO: Sjednotit s tím, jak se řadí organizátoři v seznau orgů na webu
|
||||
ordering = ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni']
|
||||
managed = False
|
||||
|
|
Loading…
Reference in a new issue