From eae797de157414a986bcd2d25242933381478f11 Mon Sep 17 00:00:00 2001 From: Eduardo Edson Batista Cordeiro Alves Date: Wed, 5 Oct 2016 14:42:51 -0300 Subject: [PATCH] Remove TipoInstituicao --- .../migrations/0002_delete_tipoinstituicao.py | 18 ++++++++++++++++++ sapl/protocoloadm/models.py | 11 ----------- sapl/protocoloadm/urls.py | 5 +---- sapl/protocoloadm/views.py | 3 +-- sapl/templates/protocoloadm/layouts.yaml | 4 ---- 5 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 sapl/protocoloadm/migrations/0002_delete_tipoinstituicao.py diff --git a/sapl/protocoloadm/migrations/0002_delete_tipoinstituicao.py b/sapl/protocoloadm/migrations/0002_delete_tipoinstituicao.py new file mode 100644 index 000000000..064981161 --- /dev/null +++ b/sapl/protocoloadm/migrations/0002_delete_tipoinstituicao.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-10-05 17:42 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('protocoloadm', '0001_initial'), + ] + + operations = [ + migrations.DeleteModel( + name='TipoInstituicao', + ), + ] diff --git a/sapl/protocoloadm/models.py b/sapl/protocoloadm/models.py index 013ba89e2..6c65dfb6f 100644 --- a/sapl/protocoloadm/models.py +++ b/sapl/protocoloadm/models.py @@ -9,17 +9,6 @@ from sapl.materia.models import (Autor, TipoMateriaLegislativa, from sapl.utils import RANGE_ANOS, YES_NO_CHOICES -class TipoInstituicao(models.Model): - descricao = models.CharField(max_length=50, verbose_name=_('Descrição')) - - class Meta: - verbose_name = _('Tipo de Instituição') - verbose_name_plural = _('Tipos de Instituições') - - def __str__(self): - return self.descricao - - class TipoDocumentoAdministrativo(models.Model): sigla = models.CharField(max_length=5, verbose_name=_('Sigla')) descricao = models.CharField(max_length=50, verbose_name=_('Descrição')) diff --git a/sapl/protocoloadm/urls.py b/sapl/protocoloadm/urls.py index c98afe4c1..d44ce9ce3 100644 --- a/sapl/protocoloadm/urls.py +++ b/sapl/protocoloadm/urls.py @@ -17,8 +17,7 @@ from sapl.protocoloadm.views import (AnularProtocoloAdmView, ProtocoloPesquisaView, StatusTramitacaoAdministrativoCrud, TipoDocumentoAdministrativoCrud, - TipoInstituicaoCrud, TramitacaoAdmCrud, - pesquisa_autores) + TramitacaoAdmCrud, pesquisa_autores) from .apps import AppConfig @@ -35,8 +34,6 @@ urlpatterns = [ include(TramitacaoAdmCrud.get_urls())), url(r'^protocoloadm/status-tramitacao-adm/', include(StatusTramitacaoAdministrativoCrud.get_urls())), - url(r'^protocoloadm/tipo-instituicao/', - include(TipoInstituicaoCrud.get_urls())), url(r'^protocoloadm/protocolo-doc/', include(ProtocoloDocumentoCrud.get_urls())), url(r'^protocoloadm/protocolo-mat/', diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index 48f354b17..1121b1397 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -29,12 +29,11 @@ from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm, from .models import (Autor, DocumentoAcessorioAdministrativo, DocumentoAdministrativo, Protocolo, StatusTramitacaoAdministrativo, - TipoDocumentoAdministrativo, TipoInstituicao, + TipoDocumentoAdministrativo, TramitacaoAdministrativo) TipoDocumentoAdministrativoCrud = CrudAux.build( TipoDocumentoAdministrativo, '') -TipoInstituicaoCrud = CrudAux.build(TipoInstituicao, '') ProtocoloDocumentoCrud = Crud.build(Protocolo, '') diff --git a/sapl/templates/protocoloadm/layouts.yaml b/sapl/templates/protocoloadm/layouts.yaml index c9f872b6f..907d3174d 100644 --- a/sapl/templates/protocoloadm/layouts.yaml +++ b/sapl/templates/protocoloadm/layouts.yaml @@ -46,7 +46,3 @@ Protocolo: - assunto_ementa - autor - observacao - -TipoInstituicao: - {% trans 'Tipo de Instituição' %}: - - descricao