Browse Source

#37 Remove codigo de solicitação

pull/6/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
committed by Luciano Almeida
parent
commit
8c287c79ca
  1. 3
      sigi/apps/solicitacoes/forms.py
  2. 19
      sigi/apps/solicitacoes/migrations/0006_remove_solicitacao_codigo.py
  3. 1
      sigi/apps/solicitacoes/models.py

3
sigi/apps/solicitacoes/forms.py

@ -43,11 +43,10 @@ class SolicitacaoForm(ModelForm):
class Meta: class Meta:
model = Solicitacao model = Solicitacao
fields = [u'codigo', u'usuario', u'sistema', fields = [u'usuario', u'sistema',
u'email_contato', u'telefone_contato', u'email_contato', u'telefone_contato',
u'casa_legislativa', u'titulo', u'resumo'] u'casa_legislativa', u'titulo', u'resumo']
widgets = { widgets = {
u'codigo': forms.HiddenInput(),
u'usuario': forms.HiddenInput(), u'usuario': forms.HiddenInput(),
u'casa_legislativa': forms.TextInput( u'casa_legislativa': forms.TextInput(
attrs={'readonly': 'readonly'}), attrs={'readonly': 'readonly'}),

19
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',
),
]

1
sigi/apps/solicitacoes/models.py

@ -9,7 +9,6 @@ from sigi.apps.usuarios.models import Usuario
class Solicitacao(models.Model): class Solicitacao(models.Model):
codigo = models.PositiveIntegerField(unique=True)
usuario = models.ForeignKey(Usuario) usuario = models.ForeignKey(Usuario)
sistema = models.ForeignKey(TipoServico) sistema = models.ForeignKey(TipoServico)
titulo = models.CharField(verbose_name=_(u'Título'), max_length=100) titulo = models.CharField(verbose_name=_(u'Título'), max_length=100)

Loading…
Cancel
Save