Browse Source

Move sapl.layout para crispy_layout_mixin

pull/237/head
Marcio Mazza 9 years ago
parent
commit
0356e21b79
  1. 20
      base/forms.py
  2. 28
      comissoes/forms.py
  3. 2
      comissoes/models.py
  4. 2
      compilacao/forms.py
  5. 0
      crispy_layout_mixin.py
  6. 2
      crud.py
  7. 70
      materia/forms.py
  8. 2
      materia/models.py
  9. 20
      norma/forms.py
  10. 2
      norma/models.py
  11. 46
      parlamentares/forms.py
  12. 2
      parlamentares/models.py
  13. 62
      protocoloadm/forms.py
  14. 2
      protocoloadm/models.py
  15. 14
      sessao/forms.py
  16. 2
      sessao/models.py

20
base/forms.py

@ -3,8 +3,8 @@ from crispy_forms.layout import HTML, Fieldset, Layout
from django import forms
from django.forms import ModelForm
import sapl
from sapl.layout import form_actions
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from .models import CasaLegislativa
@ -89,33 +89,33 @@ class CasaLegislativaTabelaAuxForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('codigo', 2),
('nome', 5),
('sigla', 5)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('endereco', 8),
('cep', 4)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('municipio', 10),
('uf', 2)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('telefone', 6),
('fax', 6)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('logotipo', 12)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('endereco_web', 12)])
row7 = sapl.layout.to_row(
row7 = crispy_layout_mixin.to_row(
[('email', 12)])
row8 = sapl.layout.to_row(
row8 = crispy_layout_mixin.to_row(
[('informacao_geral', 12)])
self.helper = FormHelper()

28
comissoes/forms.py

@ -3,9 +3,9 @@ from crispy_forms.layout import Fieldset, Layout
from django import forms
from django.forms import ModelForm
import sapl
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from parlamentares.models import Filiacao
from sapl.layout import form_actions
from .models import Comissao, Participacao
@ -40,38 +40,38 @@ class CadastrarComissaoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('nome', 8),
('sigla', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('tipo', 3),
('data_criacao', 3),
('unidade_deliberativa', 3),
('data_extincao', 3)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('local_reuniao', 4),
('agenda_reuniao', 4),
('telefone_reuniao', 4)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('endereco_secretaria', 4),
('telefone_secretaria', 4),
('fax_secretaria', 4)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('secretario', 6),
('email', 6)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('finalidade', 12)])
row7 = sapl.layout.to_row(
row7 = crispy_layout_mixin.to_row(
[('apelido_temp', 9),
('data_instalacao_temp', 3)])
row8 = sapl.layout.to_row(
row8 = crispy_layout_mixin.to_row(
[('data_final_prevista_temp', 4),
('data_prorrogada_temp', 4),
('data_fim_comissao', 4)])
@ -148,19 +148,19 @@ class ParticipacaoCadastroForm(ModelForm):
def __init__(self, *args, **kwargs):
self.helper = FormHelper()
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('parlamentar_id', 4),
('cargo', 4),
('titular', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data_designacao', 6),
('data_desligamento', 6)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('motivo_desligamento', 12)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('observacao', 12)])
self.helper.layout = Layout(

2
comissoes/models.py

@ -1,7 +1,7 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from parlamentares.models import Parlamentar
from sapl.utils import YES_NO_CHOICES

2
compilacao/forms.py

@ -12,7 +12,7 @@ from compilacao.models import (NOTAS_PUBLICIDADE_CHOICES,
Publicacao, TextoArticulado, TipoNota,
TipoPublicacao, TipoTextoArticulado, TipoVide,
VeiculoPublicacao, Vide)
from sapl.layout import SaplFormLayout, to_column, to_row
from crispy_layout_mixin import SaplFormLayout, to_column, to_row
from sapl.utils import YES_NO_CHOICES
error_messages = {

0
sapl/layout.py → crispy_layout_mixin.py

2
crud.py

@ -7,7 +7,7 @@ from django.utils.translation import ugettext_lazy as _
from django.views.generic import (CreateView, DeleteView, DetailView, ListView,
UpdateView)
from sapl.layout import SaplFormLayout
from crispy_layout_mixin import SaplFormLayout
def from_to(start, end):

70
materia/forms.py

@ -6,10 +6,10 @@ from django import forms
from django.forms import ModelForm
from django.utils.safestring import mark_safe
import sapl
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from norma.models import LegislacaoCitada, TipoNormaJuridica
from parlamentares.models import Parlamentar, Partido
from sapl.layout import form_actions
from .models import (AcompanhamentoMateria, Anexada, Autor, DespachoInicial,
DocumentoAcessorio, MateriaLegislativa, Numeracao, Origem,
@ -87,15 +87,15 @@ class ProposicaoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 12)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('descricao', 12)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('tipo_materia', 4),
('numero_materia', 4),
('ano_materia', 4)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('texto_original', 10)])
row4.append(
@ -118,7 +118,7 @@ class AcompanhamentoMateriaForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row([('email', 10)])
row1 = crispy_layout_mixin.to_row([('email', 10)])
row1.append(
Column(form_actions(save_label='Cadastrar'), css_class='col-md-2')
@ -167,15 +167,15 @@ class DocumentoAcessorioForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4),
('nome', 4),
('data', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('autor', 12)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('ementa', 12)])
self.helper = FormHelper()
@ -252,23 +252,23 @@ class TramitacaoForm(ModelForm):
'texto']
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('data_tramitacao', 6),
('unidade_tramitacao_local', 6)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('status', 5),
('turno', 5),
('urgente', 2)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('unidade_tramitacao_destino', 12)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('data_encaminhamento', 6),
('data_fim_prazo', 6)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('texto', 12)])
self.helper = FormHelper()
@ -339,24 +339,24 @@ class LegislacaoCitadaForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4),
('numero', 4),
('ano', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('disposicao', 3),
('parte', 3),
('livro', 3),
('titulo', 3)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('capitulo', 3),
('secao', 3),
('subsecao', 3),
('artigo', 3)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('paragrafo', 3),
('inciso', 3),
('alinea', 3),
@ -407,9 +407,9 @@ class NumeracaoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo_materia', 12)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('numero_materia', 4),
('ano_materia', 4),
('data_materia', 4)])
@ -474,11 +474,11 @@ class MateriaAnexadaForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4),
('numero', 4),
('ano', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data_anexacao', 6),
('data_desanexacao', 6)])
@ -516,21 +516,21 @@ class FormularioSimplificadoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4),
('numero', 4),
('ano', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data_apresentacao', 4),
('numero_protocolo', 4),
('regime_tramitacao', 4)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('texto_original', 9),
('em_tramitacao', 3)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('ementa', 12)])
self.helper = FormHelper()
@ -730,29 +730,29 @@ class MateriaLegislativaPesquisaForm(forms.Form):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 12)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('numero', 4),
('ano', 4),
('numero_protocolo', 4)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('data_apresentacao', 6),
('data_publicacao', 6)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('autor', 6),
('partido_autor', 6)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('tipo_autor', 6),
('relator', 6)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('local_origem_externa', 6),
('localizacao', 6)])
row7 = sapl.layout.to_row(
row7 = crispy_layout_mixin.to_row(
[('tramitacao', 4),
('situacao', 4),
('ordem', 4)])
row8 = sapl.layout.to_row(
row8 = crispy_layout_mixin.to_row(
[('assunto', 12)])
self.helper = FormHelper()

2
materia/models.py

@ -1,8 +1,8 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from comissoes.models import Comissao
from model_utils import Choices
from parlamentares.models import Parlamentar, Partido
from sapl.utils import YES_NO_CHOICES, xstr

20
norma/forms.py

@ -4,9 +4,9 @@ from django import forms
from django.forms import ModelForm
from django.utils.safestring import mark_safe
import sapl
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from materia.models import TipoMateriaLegislativa
from sapl.layout import form_actions
from .models import NormaJuridica
@ -58,37 +58,37 @@ class NormaJuridicaForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4),
('numero', 4),
('ano', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data', 4),
('esfera_federacao', 4),
('complemento', 4)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('tipo_materia', 4),
('numero_materia', 4),
('ano_materia', 4)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('data_publicacao', 3),
('veiculo_publicacao', 3),
('pagina_inicio_publicacao', 3),
('pagina_fim_publicacao', 3)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('texto_integral', 12)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('ementa', 12)])
row7 = sapl.layout.to_row(
row7 = crispy_layout_mixin.to_row(
[('indexacao', 12)])
row8 = sapl.layout.to_row(
row8 = crispy_layout_mixin.to_row(
[('observacao', 12)])
self.helper = FormHelper()

2
norma/models.py

@ -1,9 +1,9 @@
from django.db import models
from django.template import defaultfilters
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from materia.models import MateriaLegislativa
from model_utils import Choices
from sapl.utils import YES_NO_CHOICES

46
parlamentares/forms.py

@ -4,8 +4,8 @@ from django import forms
from django.forms import ModelForm
from django.utils.safestring import mark_safe
import sapl
from sapl.layout import form_actions
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from .models import Dependente, Filiacao, Mandato, Parlamentar
@ -103,55 +103,55 @@ class ParlamentaresForm (ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('nome_parlamentar', 8), ('ativo', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('nome_completo', 12)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('nivel_instrucao', 4),
('sexo', 4),
('data_nascimento', 4)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('cpf', 4),
('rg', 4),
('titulo_eleitor', 4)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('situacao_militar', 6),
('profissao', 6)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('endereco_web', 12)])
row7 = sapl.layout.to_row(
row7 = crispy_layout_mixin.to_row(
[('email', 12)])
row8 = sapl.layout.to_row(
row8 = crispy_layout_mixin.to_row(
[('numero_gab_parlamentar', 4),
('telefone', 4),
('fax', 4)])
row9 = sapl.layout.to_row(
row9 = crispy_layout_mixin.to_row(
[('endereco_residencia', 6),
('cep_residencia', 6)])
row10 = sapl.layout.to_row(
row10 = crispy_layout_mixin.to_row(
[('municipio_residencia', 12)])
row11 = sapl.layout.to_row(
row11 = crispy_layout_mixin.to_row(
[('telefone_residencia', 6),
('fax_residencia', 6)])
row12 = sapl.layout.to_row(
row12 = crispy_layout_mixin.to_row(
[('locais_atuacao', 12)])
row13 = sapl.layout.to_row(
row13 = crispy_layout_mixin.to_row(
[('fotografia', 12)])
row14 = sapl.layout.to_row(
row14 = crispy_layout_mixin.to_row(
[('biografia', 12)])
self.helper = FormHelper()
@ -203,16 +203,16 @@ class MandatoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('legislatura', 4),
('coligacao', 4),
('votos_recebidos', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data_fim_mandato', 6),
('data_expedicao_diploma', 6)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('observacao', 12)])
self.helper = FormHelper()
@ -251,15 +251,15 @@ class DependenteForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('nome', 12)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('tipo', 4),
('sexo', 4),
('data_nascimento', 4)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('cpf', 4),
('rg', 4),
('titulo_eleitor', 4)])
@ -297,7 +297,7 @@ class FiliacaoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('partido', 4),
('data', 4),
('data_desfiliacao', 4)])

2
parlamentares/models.py

@ -2,8 +2,8 @@ import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from sapl.utils import YES_NO_CHOICES

62
protocoloadm/forms.py

@ -6,9 +6,9 @@ from django import forms
from django.forms import ModelForm
from django.utils.safestring import mark_safe
import sapl
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from materia.models import TipoMateriaLegislativa
from sapl.layout import form_actions
from .models import (Autor, DocumentoAcessorioAdministrativo,
DocumentoAdministrativo, TipoDocumentoAdministrativo,
@ -102,25 +102,25 @@ class ProtocoloForm(forms.Form):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('numero_protocolo', 6),
('ano', 6)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('inicial', 6),
('final', 6)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('tipo_documento', 4),
('tipo_protocolo', 4),
('tipo_materia', 4)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('interessado', 4),
('autor', 4),
('assunto', 4)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('natureza_processo', 12)])
self.helper = FormHelper()
@ -147,10 +147,10 @@ class AnularProcoloAdmForm(forms.Form):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('numero_protocolo', 6),
('ano_protocolo', 6)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('justificativa_anulacao', 12)])
self.helper = FormHelper()
@ -202,18 +202,18 @@ class ProtocoloDocumentForm(forms.Form):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('numeracao', 12)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('tipo_protocolo', 12)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('tipo_documento', 6),
('num_paginas', 6)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('assunto', 12)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('interessado', 12)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('observacao', 12)])
self.helper = FormHelper()
@ -274,16 +274,16 @@ class ProtocoloMateriaForm(forms.Form):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('numeracao', 12)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('tipo_materia', 6),
('num_paginas', 6)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('ementa', 12)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('autor', 12)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('observacao', 12)])
self.helper = FormHelper()
@ -348,15 +348,15 @@ class DocumentoAcessorioAdministrativoForm(ModelForm):
def __init__(self, excluir=False, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4),
('nome', 4),
('data', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('autor', 12)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('arquivo', 12)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('assunto', 12)])
more = []
@ -448,25 +448,25 @@ class DocumentoAdministrativoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('tipo', 4), ('numero', 4), ('ano', 4)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data', 6), ('numero_protocolo', 6)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('assunto', 12)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('interessado', 9), ('tramitacao', 3)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('texto_integral', 12)])
row6 = sapl.layout.to_row(
row6 = crispy_layout_mixin.to_row(
[('dias_prazo', 6), ('data_fim_prazo', 6)])
row7 = sapl.layout.to_row(
row7 = crispy_layout_mixin.to_row(
[('observacao', 12)])
self.helper = FormHelper()

2
protocoloadm/models.py

@ -2,9 +2,9 @@ from uuid import uuid4
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from materia.models import Autor, TipoMateriaLegislativa, UnidadeTramitacao
from model_utils import Choices
from sapl.utils import YES_NO_CHOICES

14
sessao/forms.py

@ -3,8 +3,8 @@ from crispy_forms.layout import Fieldset, Layout
from django import forms
from django.forms import ModelForm
import sapl
from sapl.layout import form_actions
import crispy_layout_mixin
from crispy_layout_mixin import form_actions
from .models import SessaoPlenaria
@ -97,27 +97,27 @@ class SessaoForm(ModelForm):
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
row1 = crispy_layout_mixin.to_row(
[('numero', 3),
('tipo', 3),
('legislatura', 3),
('sessao_legislativa', 3)])
row2 = sapl.layout.to_row(
row2 = crispy_layout_mixin.to_row(
[('data_inicio', 4),
('hora_inicio', 4),
('iniciada', 4)])
row3 = sapl.layout.to_row(
row3 = crispy_layout_mixin.to_row(
[('data_fim', 4),
('hora_fim', 4),
('finalizada', 4)])
row4 = sapl.layout.to_row(
row4 = crispy_layout_mixin.to_row(
[('upload_pauta', 6),
('upload_ata', 6)])
row5 = sapl.layout.to_row(
row5 = crispy_layout_mixin.to_row(
[('url_audio', 6),
('url_video', 6)])

2
sessao/models.py

@ -1,8 +1,8 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils import Choices
from materia.models import MateriaLegislativa
from model_utils import Choices
from parlamentares.models import (CargoMesa, Legislatura, Parlamentar,
SessaoLegislativa)
from sapl.utils import YES_NO_CHOICES

Loading…
Cancel
Save