Browse Source

Personalni: managed = True + makemigrations

pull/43/head
Pavel 'LEdoian' Turinsky 7 months ago
parent
commit
a17914f49c
  1. 33
      personalni/migrations/0004_alter_organizator_options_alter_osoba_options_and_more.py
  2. 5
      personalni/models.py

33
personalni/migrations/0004_alter_organizator_options_alter_osoba_options_and_more.py

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

5
personalni/models.py

@ -25,7 +25,6 @@ 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)
@ -129,7 +128,6 @@ 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)
@ -182,7 +180,6 @@ 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
@ -212,7 +209,6 @@ 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)
@ -409,7 +405,6 @@ class Organizator(SeminarModelBase):
# 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
db_table = 'seminar_organizator' db_table = 'seminar_organizator'
ordering = ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni'] ordering = ['-organizuje_do', 'osoba__jmeno', 'osoba__prijmeni']
managed = False
osoba = models.OneToOneField(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=False, blank=False,

Loading…
Cancel
Save