diff --git a/seminar/migrations/0040_pohadka_nepovinny_autor.py b/seminar/migrations/0040_pohadka_nepovinny_autor.py new file mode 100644 index 00000000..092cb578 --- /dev/null +++ b/seminar/migrations/0040_pohadka_nepovinny_autor.py @@ -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), + ), + ] diff --git a/seminar/models.py b/seminar/models.py index 21292580..00d49449 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -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(