Pohádka: nepovinný autor

* migrace
This commit is contained in:
Matěj Kocián 2016-02-17 16:13:11 +01:00
parent 5ddf810a2f
commit 4fdc0ac0ec
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('seminar', '0039_pohadka'),
]
operations = [
migrations.AlterField(
model_name='pohadka',
name='autor',
field=models.ForeignKey(verbose_name=b'Autor poh\xc3\xa1dky', to=settings.AUTH_USER_MODEL, null=True),
),
]

View file

@ -612,7 +612,11 @@ class Pohadka(SeminarModelBase):
autor = models.ForeignKey(
settings.AUTH_USER_MODEL,
verbose_name="Autor pohádky"
verbose_name="Autor pohádky",
# Při nahrávání z TeXu není vyplnění vyžadováno, v adminu je
null=True,
blank=False
)
timestamp = models.DateTimeField(