Browse Source

Fix QA issues

pull/11/merge
Edward Ribeiro 9 years ago
parent
commit
c7a2923726
  1. 1
      materia/urls.py
  2. 69
      materia/views.py
  3. 20
      protocoloadm/urls.py
  4. 4
      protocoloadm/views.py

1
materia/urls.py

@ -1,4 +1,5 @@
from django.conf.urls import include, url
from materia.views import (FormularioCadastroView, FormularioSimplificadoView,
autor_crud, materia_legislativa_crud, orgao_crud,
origem_crud, regime_tramitacao_crud,

69
materia/views.py

@ -1,16 +1,18 @@
from datetime import date, datetime
from datetime import date
from crispy_forms.helper import FormHelper
from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit
from django import forms
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.forms import ModelForm
from django.shortcuts import render
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.views.generic.edit import FormMixin
from sapl.crud import build_crud
from vanilla import GenericView
from sapl.crud import build_crud
from .models import (Anexada, Autor, Autoria, DocumentoAcessorio,
MateriaLegislativa, Numeracao, Orgao, Origem, Proposicao,
RegimeTramitacao, Relatoria, StatusTramitacao, TipoAutor,
@ -295,6 +297,7 @@ class FormularioSimplificadoForm(forms.Form):
# form.fields['otherFields'].widget.attrs['enabled'] = True
class FormularioCadastroForm(ModelForm):
class Meta:
@ -410,35 +413,37 @@ class FormularioSimplificadoView(FormMixin, GenericView):
return self.render_to_response({'form': form})
# id serial NOT NULL,
# numero integer NOT NULL,
# ano smallint NOT NULL,
# numero_protocolo integer,
# data_apresentacao date,
# tipo_apresentacao character varying(1),
# data_publicacao date,
# numero_origem_externa character varying(5),
# ano_origem_externa smallint,
# data_origem_externa date,
# apelido character varying(50),
# dias_prazo integer,
# data_fim_prazo date,
# em_tramitacao boolean NOT NULL,
# polemica boolean,
# objeto character varying(150),
# complementar boolean,
# ementa text NOT NULL,
# indexacao text,
# observacao text,
# resultado text,
# local_origem_externa_id integer,
# regime_tramitacao_id integer NOT NULL,
# tipo_id integer NOT NULL,
# tipo_origem_externa_id integer,
# texto_original character varying(100),
# duplicate key value violates unique constraint "materia_materialegislativa_tipo_id_2646a902479b4205_uniq"
# DETAIL: Key (tipo_id, numero, ano)=(2, 1, 2015) already exists.
# id serial NOT NULL,
# numero integer NOT NULL,
# ano smallint NOT NULL,
# numero_protocolo integer,
# data_apresentacao date,
# tipo_apresentacao character varying(1),
# data_publicacao date,
# numero_origem_externa character varying(5),
# ano_origem_externa smallint,
# data_origem_externa date,
# apelido character varying(50),
# dias_prazo integer,
# data_fim_prazo date,
# em_tramitacao boolean NOT NULL,
# polemica boolean,
# objeto character varying(150),
# complementar boolean,
# ementa text NOT NULL,
# indexacao text,
# observacao text,
# resultado text,
# local_origem_externa_id integer,
# regime_tramitacao_id integer NOT NULL,
# tipo_id integer NOT NULL,
# tipo_origem_externa_id integer,
# texto_original character varying(100),
# duplicate key value violates unique constraint
# "materia_materialegislativa_tipo_id_2646a902479b4205_uniq"
# DETAIL: Key (tipo_id, numero, ano)=(2, 1, 2015) already exists.
class FormularioCadastroView(FormMixin, GenericView):
template_name = "materia/formulario_cadastro.html"

20
protocoloadm/urls.py

@ -1,10 +1,11 @@
from django.conf.urls import include, url
from protocoloadm.views import (AnularProtocoloAdmView, ProtocoloDocumentoView,
ProtocoloListView, ProtocoloMateriaView,
ProtocoloPesquisaView,
ProposicaoReceberView, ProposicoesIncorporadasView,
ProposicoesNaoIncorporadasView, ProposicoesNaoRecebidasView,
from protocoloadm.views import (AnularProtocoloAdmView, ProposicaoReceberView,
ProposicoesIncorporadasView,
ProposicoesNaoIncorporadasView,
ProposicoesNaoRecebidasView,
ProtocoloDocumentoView, ProtocoloListView,
ProtocoloMateriaView, ProtocoloPesquisaView,
documento_acessorio_administrativo_crud,
documento_administrativo_crud,
protocolo_documento_crud,
@ -45,9 +46,12 @@ urlpatterns = [
url(r'^protocoloadm/proposicao-receber',
ProposicaoReceberView.as_view(), name='proposicao_receber'),
url(r'^protocoloadm/proposicoes-naorecebidas',
ProposicoesNaoRecebidasView.as_view(), name='proposicoes_naorecebidas'),
ProposicoesNaoRecebidasView.as_view(),
name='proposicoes_naorecebidas'),
url(r'^protocoloadm/proposicoes-naoincorporadas',
ProposicoesNaoIncorporadasView.as_view(), name='proposicoes_naoincorporadas'),
ProposicoesNaoIncorporadasView.as_view(),
name='proposicoes_naoincorporadas'),
url(r'^protocoloadm/proposicoes-incorporadas',
ProposicoesIncorporadasView.as_view(), name='proposicoes_incorporadas'),
ProposicoesIncorporadasView.as_view(),
name='proposicoes_incorporadas'),
]

4
protocoloadm/views.py

@ -12,7 +12,6 @@ from django.utils.translation import ugettext_lazy as _
from django.views.generic import ListView
from django.views.generic.base import TemplateView
from django.views.generic.edit import FormMixin
from vanilla import GenericView
from materia.models import TipoMateriaLegislativa
@ -502,12 +501,15 @@ class ProtocoloMateriaView(FormMixin, GenericView):
# TODO: move to Proposicao app
class ProposicaoReceberView(TemplateView):
template_name = "protocoloadm/proposicao_receber.html"
class ProposicoesNaoRecebidasView(TemplateView):
template_name = "protocoloadm/proposicoes_naorecebidas.html"
class ProposicoesNaoIncorporadasView(TemplateView):
template_name = "protocoloadm/proposicoes_naoincorporadas.html"

Loading…
Cancel
Save