Zrušení seminar.Nastaveni
This commit is contained in:
parent
6a5390cdf6
commit
0bbb860b16
3 changed files with 18 additions and 32 deletions
16
seminar/migrations/0116_delete_nastaveni.py
Normal file
16
seminar/migrations/0116_delete_nastaveni.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Generated by Django 3.2.23 on 2023-12-11 19:25
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('seminar', '0115_alter_nastaveni_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='Nastaveni',
|
||||
),
|
||||
]
|
|
@ -6,3 +6,5 @@ from .soustredeni import *
|
|||
from .pomocne import *
|
||||
from .treenode import *
|
||||
from .novinky import *
|
||||
|
||||
from various.models import Nastaveni
|
||||
|
|
|
@ -722,35 +722,3 @@ class Pohadka(SeminarModelBase):
|
|||
except ObjectDoesNotExist:
|
||||
# Neexistující *Node nemá smysl aktualizovat.
|
||||
pass
|
||||
|
||||
|
||||
@reversion.register(ignore_duplicates=True)
|
||||
class Nastaveni(SingletonModel):
|
||||
|
||||
class Meta:
|
||||
db_table = 'seminar_nastaveni'
|
||||
verbose_name = 'Nastavení semináře'
|
||||
managed = False
|
||||
|
||||
# aktualni_rocnik = models.ForeignKey(Rocnik, verbose_name='aktuální ročník',
|
||||
# null=False, on_delete=models.PROTECT)
|
||||
|
||||
aktualni_cislo = models.ForeignKey(Cislo, verbose_name='Aktuální číslo',
|
||||
null=False, on_delete=models.PROTECT, related_name='aktualni_cislo_old')
|
||||
|
||||
cena_sous = models.IntegerField(null=False,
|
||||
verbose_name="Účastnický poplatek za soustředění",
|
||||
default=1000)
|
||||
|
||||
@property
|
||||
def aktualni_rocnik(self):
|
||||
return self.aktualni_cislo.rocnik
|
||||
|
||||
def __str__(self):
|
||||
return 'Nastavení semináře'
|
||||
|
||||
def admin_url(self):
|
||||
return reverse('admin:seminar_nastaveni_change', args=(self.id, ))
|
||||
|
||||
def verejne(self):
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue