Browse Source

fix qa_check

pull/98/head
LeandroRoberto 9 years ago
parent
commit
77513ad63b
  1. 11
      compilacao/forms.py
  2. 1
      compilacao/templatetags/compilacao_filters.py
  3. 3
      compilacao/urls.py
  4. 5
      compilacao/utils.py
  5. 17
      compilacao/views.py
  6. 16
      compilacao/views2.py
  7. 12
      materia/urls.py
  8. 5
      materia/views.py
  9. 8
      norma/urls.py
  10. 4
      norma/views.py
  11. 2
      sapl/settings.py
  12. 1
      sessao/views.py

11
compilacao/forms.py

@ -2,18 +2,17 @@
from crispy_forms.helper import FormHelper
from crispy_forms_foundation.layout import (HTML, Column, Div, Fieldset,
Layout, Row, Submit)
from crispy_forms_foundation.layout.buttons import Button, ButtonHolder
from crispy_forms_foundation.layout.buttons import Button
from crispy_forms_foundation.layout.fields import Field
from django import forms
from django.core.exceptions import NON_FIELD_ERRORS
from django.forms.models import ModelForm
from django.utils.translation import ugettext_lazy as _
from compilacao import utils, models
from compilacao.models import Dispositivo, Nota, TipoNota, TipoVide, Vide,\
TextoArticulado, TipoTextoArticulado
from compilacao.utils import to_row, to_column, to_fieldsets
from norma.models import TipoNormaJuridica
from compilacao import models
from compilacao.models import (Dispositivo, Nota, TextoArticulado, TipoNota,
TipoTextoArticulado, TipoVide, Vide)
from compilacao.utils import to_column, to_fieldsets, to_row
class UpLoadImportFileForm(forms.Form):

1
compilacao/templatetags/compilacao_filters.py

@ -154,7 +154,6 @@ def nomenclatura_heranca(d, ignore_ultimo=0, ignore_primeiro=0):
return result
@register.simple_tag
def verbose_name(instance, field_name):
return instance._meta.get_field(field_name).verbose_name.title()

3
compilacao/urls.py

@ -59,9 +59,6 @@ urlpatterns = [
"""
url(r'^(?P<ta_id>[0-9]+)/compilacao/(?P<dispositivo_id>[0-9]+)/refresh',
views.DispositivoEditView.as_view(), name='dispositivo_edit'),

5
compilacao/utils.py

@ -1,7 +1,4 @@
from crispy_forms_foundation.layout import (HTML, Column, Div, Fieldset,
Layout, Row, Submit)
from django.apps import apps
from django.contrib import admin
from crispy_forms_foundation.layout import Column, Fieldset, Row
from django.utils.translation import ugettext_lazy as _

17
compilacao/views.py

@ -1,33 +1,26 @@
from collections import OrderedDict
from datetime import datetime, timedelta
from os.path import sys
from braces.views import FormMessagesMixin
from django.contrib.auth.decorators import login_required
from django.contrib.messages.api import success
from django.core.signing import Signer
from django.core.urlresolvers import reverse, reverse_lazy
from django.db.models import Q
from django.http.response import (HttpResponse, HttpResponseRedirect,
JsonResponse)
from django.shortcuts import get_object_or_404, render
from django.http.response import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.utils.dateparse import parse_date
from django.utils.decorators import method_decorator
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import TemplateView
from django.views.generic.detail import DetailView
from django.views.generic.edit import FormMixin, UpdateView, CreateView,\
DeleteView
from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.views.generic.list import ListView
from compilacao import forms, utils
from compilacao.models import (Dispositivo, Nota,
PerfilEstruturalTextoArticulado,
TipoDispositivo, TipoNota, TipoPublicacao,
TipoVide, VeiculoPublicacao, Vide,
TextoArticulado)
TextoArticulado, TipoDispositivo, TipoNota,
Vide)
DISPOSITIVO_SELECT_RELATED = (
'tipo_dispositivo',

16
compilacao/views2.py

@ -2,26 +2,22 @@ from collections import OrderedDict
from datetime import datetime, timedelta
from os.path import sys
from django.contrib.auth.decorators import login_required
from django.core.signing import Signer
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.http.response import (HttpResponse, HttpResponseRedirect,
JsonResponse)
from django.shortcuts import get_object_or_404, render
from django.http.response import JsonResponse
from django.shortcuts import render
from django.utils.dateparse import parse_date
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import TemplateView
from django.views.generic.edit import FormMixin, UpdateView, CreateView
from django.views.generic.edit import FormMixin
from django.views.generic.list import ListView
from compilacao import forms
from compilacao.models import (Dispositivo, Nota,
PerfilEstruturalTextoArticulado,
TipoDispositivo, TipoNota, TipoPublicacao,
TipoVide, VeiculoPublicacao, Vide,
TextoArticulado)
TextoArticulado, TipoDispositivo, TipoNota,
TipoPublicacao, TipoVide, VeiculoPublicacao,
Vide)
from sapl.crud import build_crud
DISPOSITIVO_SELECT_RELATED = (

12
materia/urls.py

@ -6,18 +6,16 @@ from materia.views import (AutoriaEditView, AutoriaView,
FormularioCadastroView, FormularioSimplificadoView,
LegislacaoCitadaEditView, LegislacaoCitadaView,
MateriaAnexadaEditView, MateriaAnexadaView,
MateriaLegislativaPesquisaView, NumeracaoEditView,
NumeracaoView, PesquisaMateriaListView,
ProposicaoListView, ProposicaoView,
RelatoriaEditView, RelatoriaView,
MateriaLegislativaPesquisaView, MateriaTaView,
NumeracaoEditView, NumeracaoView,
PesquisaMateriaListView, ProposicaoListView,
ProposicaoView, RelatoriaEditView, RelatoriaView,
TramitacaoEditView, TramitacaoView, autor_crud,
materia_legislativa_crud, orgao_crud, origem_crud,
regime_tramitacao_crud, status_tramitacao_crud,
tipo_autor_crud, tipo_documento_crud,
tipo_fim_relatoria_crud, tipo_materia_crud,
tipo_proposicao_crud, unidade_tramitacao_crud,
MateriaTaView)
tipo_proposicao_crud, unidade_tramitacao_crud)
materia_legislativa_patterns = materia_legislativa_crud.urlpatterns

5
materia/views.py

@ -8,7 +8,7 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse, reverse_lazy
from django.forms import ModelForm
from django.shortcuts import redirect, get_object_or_404
from django.shortcuts import get_object_or_404, redirect
from django.utils.html import strip_tags
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
@ -16,12 +16,12 @@ from django.views.generic import ListView
from django.views.generic.edit import FormMixin
from vanilla import GenericView
import sapl
from comissoes.models import Comissao, Composicao
from compilacao.models import TextoArticulado, TipoTextoArticulado
from norma.models import LegislacaoCitada, NormaJuridica, TipoNormaJuridica
from parlamentares.models import Parlamentar
from sapl.crud import build_crud
import sapl
from .models import (Anexada, Autor, Autoria, DespachoInicial,
DocumentoAcessorio, MateriaLegislativa, Numeracao, Orgao,
@ -30,7 +30,6 @@ from .models import (Anexada, Autor, Autoria, DespachoInicial,
TipoFimRelatoria, TipoMateriaLegislativa, TipoProposicao,
Tramitacao, UnidadeTramitacao)
origem_crud = build_crud(
Origem, 'origem', [

8
norma/urls.py

@ -1,11 +1,7 @@
from django.conf.urls import include, url
from compilacao.urls import urlpatterns as __url__compilacao,\
urlpatterns_compilacao
from norma.views import (NormaIncluirView, assunto_norma_crud,
norma_temporario_crud, tipo_norma_crud,
NormaTaView)
from norma.views import (NormaIncluirView, NormaTaView, assunto_norma_crud,
norma_temporario_crud, tipo_norma_crud)
norma_url_patterns = norma_temporario_crud.urlpatterns
# norma_url_patterns = norma_crud.urlpatterns + []

4
norma/views.py

@ -12,19 +12,17 @@ from django.shortcuts import get_object_or_404, redirect
from django.utils.html import strip_tags
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import RedirectView
from django.views.generic.edit import FormMixin
from vanilla import GenericView
import sapl
from compilacao.models import TextoArticulado, TipoTextoArticulado
from materia.models import MateriaLegislativa, TipoMateriaLegislativa
from sapl.crud import build_crud
import sapl
from .models import (AssuntoNorma, LegislacaoCitada, NormaJuridica,
TipoNormaJuridica)
assunto_norma_crud = build_crud(
AssuntoNorma, 'assunto_norma_juridica', [

2
sapl/settings.py

@ -105,7 +105,7 @@ WSGI_APPLICATION = 'sapl.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'sapl_temp2_compilacao',
'NAME': 'sapl',
'USER': 'sapl',
'PASSWORD': 'sapl',
'HOST': 'localhost',

1
sessao/views.py

@ -25,7 +25,6 @@ from .models import (CargoMesa, ExpedienteMateria, ExpedienteSessao,
TipoExpediente, TipoResultadoVotacao, TipoSessaoPlenaria,
VotoParlamentar)
tipo_sessao_crud = build_crud(
TipoSessaoPlenaria, 'tipo_sessao_plenaria', [

Loading…
Cancel
Save