Browse Source

Odmanagovaný seminář

pull/43/head
Pavel 'LEdoian' Turinsky 9 months ago
parent
commit
e3ce5efdd6
  1. 33
      seminar/migrations/0118_alter_organizator_options_alter_osoba_options_and_more.py
  2. 7
      seminar/models/personalni.py

33
seminar/migrations/0118_alter_organizator_options_alter_osoba_options_and_more.py

@ -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'},
),
]

7
seminar/models/personalni.py

@ -25,6 +25,7 @@ class Osoba(SeminarModelBase):
verbose_name = 'Osoba' verbose_name = 'Osoba'
verbose_name_plural = 'Osoby' verbose_name_plural = 'Osoby'
ordering = ['prijmeni','jmeno'] ordering = ['prijmeni','jmeno']
managed = False
id = models.AutoField(primary_key = True) id = models.AutoField(primary_key = True)
@ -128,6 +129,7 @@ class Skola(SeminarModelBase):
verbose_name = 'Škola' verbose_name = 'Škola'
verbose_name_plural = 'Školy' verbose_name_plural = 'Školy'
ordering = ['mesto', 'nazev'] ordering = ['mesto', 'nazev']
managed = False
# Interní ID # Interní ID
id = models.AutoField(primary_key = True) id = models.AutoField(primary_key = True)
@ -180,6 +182,7 @@ class Prijemce(SeminarModelBase):
db_table = 'seminar_prijemce' db_table = 'seminar_prijemce'
verbose_name = 'příjemce' verbose_name = 'příjemce'
verbose_name_plural = 'příjemce' verbose_name_plural = 'příjemce'
managed = False
# Interní ID # Interní ID
@ -209,6 +212,7 @@ class Resitel(SeminarModelBase):
verbose_name = 'Řešitel' verbose_name = 'Řešitel'
verbose_name_plural = 'Řešitelé' verbose_name_plural = 'Řešitelé'
ordering = ['osoba'] ordering = ['osoba']
managed = False
# Interní ID # Interní ID
id = models.AutoField(primary_key = True) id = models.AutoField(primary_key = True)
@ -395,7 +399,7 @@ class Resitel(SeminarModelBase):
@reversion.register(ignore_duplicates=True) @reversion.register(ignore_duplicates=True)
class Organizator(SeminarModelBase): 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, help_text='osobní údaje organizátora', null=False, blank=False,
on_delete=models.PROTECT) on_delete=models.PROTECT)
@ -445,3 +449,4 @@ class Organizator(SeminarModelBase):
# TODO: Zohledňovat přezdívky? # TODO: Zohledňovat přezdívky?
# TODO: Sjednotit s tím, jak se řadí organizátoři v seznau orgů na webu # TODO: Sjednotit s tím, jak se řadí organizátoři v seznau orgů na webu
ordering = ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni'] ordering = ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni']
managed = False

Loading…
Cancel
Save