Personalni: managed = True + makemigrations
This commit is contained in:
parent
b4b41b9499
commit
a17914f49c
2 changed files with 33 additions and 5 deletions
|
@ -0,0 +1,33 @@
|
|||
# Generated by Django 4.2.11 on 2024-03-26 21:11
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('personalni', '0003_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='organizator',
|
||||
options={'ordering': ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni'], 'verbose_name': 'Organizátor', 'verbose_name_plural': 'Organizátoři'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='osoba',
|
||||
options={'ordering': ['prijmeni', 'jmeno'], 'verbose_name': 'Osoba', 'verbose_name_plural': 'Osoby'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='prijemce',
|
||||
options={'verbose_name': 'příjemce', 'verbose_name_plural': 'příjemce'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='resitel',
|
||||
options={'ordering': ['osoba'], 'verbose_name': 'Řešitel', 'verbose_name_plural': 'Řešitelé'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='skola',
|
||||
options={'ordering': ['mesto', 'nazev'], 'verbose_name': 'Škola', 'verbose_name_plural': 'Školy'},
|
||||
),
|
||||
]
|
|
@ -25,7 +25,6 @@ class Osoba(SeminarModelBase):
|
|||
verbose_name = 'Osoba'
|
||||
verbose_name_plural = 'Osoby'
|
||||
ordering = ['prijmeni','jmeno']
|
||||
managed = False
|
||||
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
||||
|
@ -129,7 +128,6 @@ class Skola(SeminarModelBase):
|
|||
verbose_name = 'Škola'
|
||||
verbose_name_plural = 'Školy'
|
||||
ordering = ['mesto', 'nazev']
|
||||
managed = False
|
||||
|
||||
# Interní ID
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
@ -182,7 +180,6 @@ class Prijemce(SeminarModelBase):
|
|||
db_table = 'seminar_prijemce'
|
||||
verbose_name = 'příjemce'
|
||||
verbose_name_plural = 'příjemce'
|
||||
managed = False
|
||||
|
||||
|
||||
# Interní ID
|
||||
|
@ -212,7 +209,6 @@ class Resitel(SeminarModelBase):
|
|||
verbose_name = 'Řešitel'
|
||||
verbose_name_plural = 'Řešitelé'
|
||||
ordering = ['osoba']
|
||||
managed = False
|
||||
|
||||
# Interní ID
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
@ -409,7 +405,6 @@ class Organizator(SeminarModelBase):
|
|||
# TODO: Sjednotit s tím, jak se řadí organizátoři v seznau orgů na webu
|
||||
db_table = 'seminar_organizator'
|
||||
ordering = ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni']
|
||||
managed = False
|
||||
|
||||
osoba = models.OneToOneField(Osoba, verbose_name='osoba', related_name='org',
|
||||
help_text='osobní údaje organizátora', null=False, blank=False,
|
||||
|
|
Loading…
Reference in a new issue