From 8c287c79ca455a6c42a998b56d4f04f9d5d2f594 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Tue, 28 Jun 2016 16:46:15 -0300 Subject: [PATCH] =?UTF-8?q?#37=20Remove=20codigo=20de=20solicita=C3=A7?= =?UTF-8?q?=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/solicitacoes/forms.py | 3 +-- .../0006_remove_solicitacao_codigo.py | 19 +++++++++++++++++++ sigi/apps/solicitacoes/models.py | 1 - 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 sigi/apps/solicitacoes/migrations/0006_remove_solicitacao_codigo.py diff --git a/sigi/apps/solicitacoes/forms.py b/sigi/apps/solicitacoes/forms.py index 8c702f5..614e3c1 100644 --- a/sigi/apps/solicitacoes/forms.py +++ b/sigi/apps/solicitacoes/forms.py @@ -43,11 +43,10 @@ class SolicitacaoForm(ModelForm): class Meta: model = Solicitacao - fields = [u'codigo', u'usuario', u'sistema', + fields = [u'usuario', u'sistema', u'email_contato', u'telefone_contato', u'casa_legislativa', u'titulo', u'resumo'] widgets = { - u'codigo': forms.HiddenInput(), u'usuario': forms.HiddenInput(), u'casa_legislativa': forms.TextInput( attrs={'readonly': 'readonly'}), diff --git a/sigi/apps/solicitacoes/migrations/0006_remove_solicitacao_codigo.py b/sigi/apps/solicitacoes/migrations/0006_remove_solicitacao_codigo.py new file mode 100644 index 0000000..f5d3f1b --- /dev/null +++ b/sigi/apps/solicitacoes/migrations/0006_remove_solicitacao_codigo.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.6 on 2016-06-28 14:45 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('solicitacoes', '0005_auto_20160627_1349'), + ] + + operations = [ + migrations.RemoveField( + model_name='solicitacao', + name='codigo', + ), + ] diff --git a/sigi/apps/solicitacoes/models.py b/sigi/apps/solicitacoes/models.py index 379317b..241f520 100644 --- a/sigi/apps/solicitacoes/models.py +++ b/sigi/apps/solicitacoes/models.py @@ -9,7 +9,6 @@ from sigi.apps.usuarios.models import Usuario class Solicitacao(models.Model): - codigo = models.PositiveIntegerField(unique=True) usuario = models.ForeignKey(Usuario) sistema = models.ForeignKey(TipoServico) titulo = models.CharField(verbose_name=_(u'Título'), max_length=100)