Model | Tema | Přidán abstrakt a obrázek
This commit is contained in:
parent
b97e90332c
commit
cedf5e753b
2 changed files with 26 additions and 0 deletions
23
seminar/migrations/0070_auto_20191120_2357.py
Normal file
23
seminar/migrations/0070_auto_20191120_2357.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 2.2.7 on 2019-11-20 22:57
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0069_auto_20191120_2115'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='tema',
|
||||||
|
name='abstrakt',
|
||||||
|
field=models.TextField(blank=True, verbose_name='Abstrakt na rozcestník'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='tema',
|
||||||
|
name='obrazek',
|
||||||
|
field=models.ImageField(null=True, upload_to='', verbose_name='Obrázek na rozcestník'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -717,6 +717,9 @@ class Tema(Problem):
|
||||||
rocnik = models.ForeignKey(Rocnik, verbose_name='ročník',blank=True, null=True,
|
rocnik = models.ForeignKey(Rocnik, verbose_name='ročník',blank=True, null=True,
|
||||||
on_delete=models.PROTECT)
|
on_delete=models.PROTECT)
|
||||||
|
|
||||||
|
abstrakt = models.TextField('Abstrakt na rozcestník', blank=True)
|
||||||
|
obrazek = models.ImageField('Obrázek na rozcestník', null=True)
|
||||||
|
|
||||||
def kod_v_rocniku(self):
|
def kod_v_rocniku(self):
|
||||||
if self.stav == 'zadany':
|
if self.stav == 'zadany':
|
||||||
if self.nadproblem:
|
if self.nadproblem:
|
||||||
|
|
Loading…
Reference in a new issue