diff --git a/korektury/migrations/0013_rename_autor_org.py b/korektury/migrations/0013_rename_autor_org.py new file mode 100644 index 00000000..db0d3151 --- /dev/null +++ b/korektury/migrations/0013_rename_autor_org.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('korektury', '0012_delete_autor'), + ] + + operations = [ + migrations.RenameField( + model_name='komentar', + old_name='autor_org', + new_name='autor', + ), + migrations.RenameField( + model_name='oprava', + old_name='autor_org', + new_name='autor', + ), + ] diff --git a/korektury/models.py b/korektury/models.py index 83881e6c..fb83b5ff 100644 --- a/korektury/models.py +++ b/korektury/models.py @@ -122,9 +122,9 @@ class Oprava(models.Model): status = models.CharField(u'stav opravy',max_length=16, choices=STATUS_CHOICES, blank=False, default = STATUS_K_OPRAVE) - autor_org = models.ForeignKey(Organizator, blank = True, + autor = models.ForeignKey(Organizator, blank = True, help_text='Autor opravy', - null = True) # TODO odstranit prizvisko User, TODO null = False + null = True) text = models.TextField(u'text opravy',blank = True, help_text='Text opravy') @@ -152,9 +152,9 @@ class Komentar(models.Model): cas = models.DateTimeField(u'čas komentáře',default=timezone.now,help_text = 'Čas zadání komentáře') oprava = models.ForeignKey(Oprava) - autor_org = models.ForeignKey(Organizator, blank = True, + autor = models.ForeignKey(Organizator, blank = True, help_text = u'Autor komentáře', - null = True) # TODO odstranit prizvisko User, TODO null = False + null = True) text = models.TextField(u'text komentáře',blank = True, help_text='Text komentáře')