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.helper import FormHelper
from crispy_forms_foundation.layout import (HTML, Column, Div, Fieldset, from crispy_forms_foundation.layout import (HTML, Column, Div, Fieldset,
Layout, Row, Submit) 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 crispy_forms_foundation.layout.fields import Field
from django import forms from django import forms
from django.core.exceptions import NON_FIELD_ERRORS from django.core.exceptions import NON_FIELD_ERRORS
from django.forms.models import ModelForm from django.forms.models import ModelForm
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from compilacao import utils, models from compilacao import models
from compilacao.models import Dispositivo, Nota, TipoNota, TipoVide, Vide,\ from compilacao.models import (Dispositivo, Nota, TextoArticulado, TipoNota,
TextoArticulado, TipoTextoArticulado TipoTextoArticulado, TipoVide, Vide)
from compilacao.utils import to_row, to_column, to_fieldsets from compilacao.utils import to_column, to_fieldsets, to_row
from norma.models import TipoNormaJuridica
class UpLoadImportFileForm(forms.Form): 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 return result
@register.simple_tag @register.simple_tag
def verbose_name(instance, field_name): def verbose_name(instance, field_name):
return instance._meta.get_field(field_name).verbose_name.title() 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', url(r'^(?P<ta_id>[0-9]+)/compilacao/(?P<dispositivo_id>[0-9]+)/refresh',
views.DispositivoEditView.as_view(), name='dispositivo_edit'), 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, from crispy_forms_foundation.layout import Column, Fieldset, Row
Layout, Row, Submit)
from django.apps import apps
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _

17
compilacao/views.py

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

16
compilacao/views2.py

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

12
materia/urls.py

@ -6,18 +6,16 @@ from materia.views import (AutoriaEditView, AutoriaView,
FormularioCadastroView, FormularioSimplificadoView, FormularioCadastroView, FormularioSimplificadoView,
LegislacaoCitadaEditView, LegislacaoCitadaView, LegislacaoCitadaEditView, LegislacaoCitadaView,
MateriaAnexadaEditView, MateriaAnexadaView, MateriaAnexadaEditView, MateriaAnexadaView,
MateriaLegislativaPesquisaView, NumeracaoEditView, MateriaLegislativaPesquisaView, MateriaTaView,
NumeracaoView, PesquisaMateriaListView, NumeracaoEditView, NumeracaoView,
ProposicaoListView, ProposicaoView, PesquisaMateriaListView, ProposicaoListView,
RelatoriaEditView, RelatoriaView, ProposicaoView, RelatoriaEditView, RelatoriaView,
TramitacaoEditView, TramitacaoView, autor_crud, TramitacaoEditView, TramitacaoView, autor_crud,
materia_legislativa_crud, orgao_crud, origem_crud, materia_legislativa_crud, orgao_crud, origem_crud,
regime_tramitacao_crud, status_tramitacao_crud, regime_tramitacao_crud, status_tramitacao_crud,
tipo_autor_crud, tipo_documento_crud, tipo_autor_crud, tipo_documento_crud,
tipo_fim_relatoria_crud, tipo_materia_crud, tipo_fim_relatoria_crud, tipo_materia_crud,
tipo_proposicao_crud, unidade_tramitacao_crud, tipo_proposicao_crud, unidade_tramitacao_crud)
MateriaTaView)
materia_legislativa_patterns = materia_legislativa_crud.urlpatterns 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.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse, reverse_lazy from django.core.urlresolvers import reverse, reverse_lazy
from django.forms import ModelForm 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.html import strip_tags
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ 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 django.views.generic.edit import FormMixin
from vanilla import GenericView from vanilla import GenericView
import sapl
from comissoes.models import Comissao, Composicao from comissoes.models import Comissao, Composicao
from compilacao.models import TextoArticulado, TipoTextoArticulado from compilacao.models import TextoArticulado, TipoTextoArticulado
from norma.models import LegislacaoCitada, NormaJuridica, TipoNormaJuridica from norma.models import LegislacaoCitada, NormaJuridica, TipoNormaJuridica
from parlamentares.models import Parlamentar from parlamentares.models import Parlamentar
from sapl.crud import build_crud from sapl.crud import build_crud
import sapl
from .models import (Anexada, Autor, Autoria, DespachoInicial, from .models import (Anexada, Autor, Autoria, DespachoInicial,
DocumentoAcessorio, MateriaLegislativa, Numeracao, Orgao, DocumentoAcessorio, MateriaLegislativa, Numeracao, Orgao,
@ -30,7 +30,6 @@ from .models import (Anexada, Autor, Autoria, DespachoInicial,
TipoFimRelatoria, TipoMateriaLegislativa, TipoProposicao, TipoFimRelatoria, TipoMateriaLegislativa, TipoProposicao,
Tramitacao, UnidadeTramitacao) Tramitacao, UnidadeTramitacao)
origem_crud = build_crud( origem_crud = build_crud(
Origem, 'origem', [ Origem, 'origem', [

8
norma/urls.py

@ -1,11 +1,7 @@
from django.conf.urls import include, url from django.conf.urls import include, url
from compilacao.urls import urlpatterns as __url__compilacao,\ from norma.views import (NormaIncluirView, NormaTaView, assunto_norma_crud,
urlpatterns_compilacao norma_temporario_crud, tipo_norma_crud)
from norma.views import (NormaIncluirView, assunto_norma_crud,
norma_temporario_crud, tipo_norma_crud,
NormaTaView)
norma_url_patterns = norma_temporario_crud.urlpatterns norma_url_patterns = norma_temporario_crud.urlpatterns
# norma_url_patterns = norma_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.html import strip_tags
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.views.generic.base import RedirectView
from django.views.generic.edit import FormMixin from django.views.generic.edit import FormMixin
from vanilla import GenericView from vanilla import GenericView
import sapl
from compilacao.models import TextoArticulado, TipoTextoArticulado from compilacao.models import TextoArticulado, TipoTextoArticulado
from materia.models import MateriaLegislativa, TipoMateriaLegislativa from materia.models import MateriaLegislativa, TipoMateriaLegislativa
from sapl.crud import build_crud from sapl.crud import build_crud
import sapl
from .models import (AssuntoNorma, LegislacaoCitada, NormaJuridica, from .models import (AssuntoNorma, LegislacaoCitada, NormaJuridica,
TipoNormaJuridica) TipoNormaJuridica)
assunto_norma_crud = build_crud( assunto_norma_crud = build_crud(
AssuntoNorma, 'assunto_norma_juridica', [ AssuntoNorma, 'assunto_norma_juridica', [

2
sapl/settings.py

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

1
sessao/views.py

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

Loading…
Cancel
Save