diff --git a/sessao/migrations/0005_remove_presencaordemdia_data_ordem.py b/sessao/migrations/0005_remove_presencaordemdia_data_ordem.py new file mode 100644 index 000000000..4064bdd68 --- /dev/null +++ b/sessao/migrations/0005_remove_presencaordemdia_data_ordem.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0004_auto_20150806_1614'), + ] + + operations = [ + migrations.RemoveField( + model_name='presencaordemdia', + name='data_ordem', + ), + ] diff --git a/sessao/models.py b/sessao/models.py index d6deec1bf..a23523488 100644 --- a/sessao/models.py +++ b/sessao/models.py @@ -201,7 +201,6 @@ class OrdemDia(AbstractOrdemDia): class PresencaOrdemDia(models.Model): # OrdemDiaPresenca sessao_plenaria = models.ForeignKey(SessaoPlenaria) parlamentar = models.ForeignKey(Parlamentar) - data_ordem = models.DateField() class Meta: verbose_name = _('Presença da Ordem do Dia') diff --git a/sessao/views.py b/sessao/views.py index b71c423b8..0d7c67f68 100644 --- a/sessao/views.py +++ b/sessao/views.py @@ -1,4 +1,3 @@ -import datetime from django import forms from django.utils.translation import ugettext_lazy as _ from django.views.generic.edit import FormMixin @@ -184,8 +183,6 @@ class PresencaOrdemDiaView(FormMixin, sessao_crud.CrudDetailView): ordem = PresencaOrdemDia() ordem.sessao_plenaria = self.object ordem.parlamentar = Parlamentar.objects.get(id=p) - ordem.data_ordem = datetime.datetime.now().strftime( - '%Y-%m-%d') ordem.save() return self.form_valid(form)