From eef276f04b9cbee965e822be2635e9c291506c09 Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Thu, 25 Aug 2016 09:07:31 +0200 Subject: [PATCH] korektury | odstraneni autora CharField Migrace autora z CharField na odkaz na Organizator Odstraneni stareho CharFieldu --- korektury/migrations/0012_delete_autor.py | 22 ++++++++++++++++++++++ korektury/models.py | 2 -- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 korektury/migrations/0012_delete_autor.py diff --git a/korektury/migrations/0012_delete_autor.py b/korektury/migrations/0012_delete_autor.py new file mode 100644 index 00000000..4f41a955 --- /dev/null +++ b/korektury/migrations/0012_delete_autor.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('korektury', '0011_prevod_autora_z_charField_na_Organizator'), + ] + + operations = [ + migrations.RemoveField( + model_name='komentar', + name='autor', + ), + migrations.RemoveField( + model_name='oprava', + name='autor', + ), + ] diff --git a/korektury/models.py b/korektury/models.py index 933cd60e..83881e6c 100644 --- a/korektury/models.py +++ b/korektury/models.py @@ -122,7 +122,6 @@ class Oprava(models.Model): status = models.CharField(u'stav opravy',max_length=16, choices=STATUS_CHOICES, blank=False, default = STATUS_K_OPRAVE) - autor = models.CharField(u'autor opravy',blank = True,max_length=20, help_text='Autor opravy') autor_org = models.ForeignKey(Organizator, blank = True, help_text='Autor opravy', null = True) # TODO odstranit prizvisko User, TODO null = False @@ -153,7 +152,6 @@ 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 = models.CharField(u'autor komentáře',blank = True,max_length=20, help_text='Autor komentáře') autor_org = models.ForeignKey(Organizator, blank = True, help_text = u'Autor komentáře', null = True) # TODO odstranit prizvisko User, TODO null = False