|
@ -1,16 +1,18 @@ |
|
|
from datetime import date, datetime |
|
|
from datetime import date |
|
|
|
|
|
|
|
|
from crispy_forms.helper import FormHelper |
|
|
from crispy_forms.helper import FormHelper |
|
|
from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit |
|
|
from crispy_forms.layout import ButtonHolder, Fieldset, Layout, Submit |
|
|
from django import forms |
|
|
from django import forms |
|
|
from django.core.urlresolvers import reverse |
|
|
from django.core.urlresolvers import reverse |
|
|
from django.shortcuts import render |
|
|
|
|
|
from django.forms import ModelForm |
|
|
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.utils.translation import ugettext_lazy as _ |
|
|
from django.views.generic.edit import FormMixin |
|
|
from django.views.generic.edit import FormMixin |
|
|
from sapl.crud import build_crud |
|
|
|
|
|
from vanilla import GenericView |
|
|
from vanilla import GenericView |
|
|
|
|
|
|
|
|
|
|
|
from sapl.crud import build_crud |
|
|
|
|
|
|
|
|
from .models import (Anexada, Autor, Autoria, DocumentoAcessorio, |
|
|
from .models import (Anexada, Autor, Autoria, DocumentoAcessorio, |
|
|
MateriaLegislativa, Numeracao, Orgao, Origem, Proposicao, |
|
|
MateriaLegislativa, Numeracao, Orgao, Origem, Proposicao, |
|
|
RegimeTramitacao, Relatoria, StatusTramitacao, TipoAutor, |
|
|
RegimeTramitacao, Relatoria, StatusTramitacao, TipoAutor, |
|
@ -295,6 +297,7 @@ class FormularioSimplificadoForm(forms.Form): |
|
|
|
|
|
|
|
|
# form.fields['otherFields'].widget.attrs['enabled'] = True |
|
|
# form.fields['otherFields'].widget.attrs['enabled'] = True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FormularioCadastroForm(ModelForm): |
|
|
class FormularioCadastroForm(ModelForm): |
|
|
|
|
|
|
|
|
class Meta: |
|
|
class Meta: |
|
@ -437,9 +440,11 @@ class FormularioSimplificadoView(FormMixin, GenericView): |
|
|
# tipo_origem_externa_id integer, |
|
|
# tipo_origem_externa_id integer, |
|
|
# texto_original character varying(100), |
|
|
# texto_original character varying(100), |
|
|
|
|
|
|
|
|
# duplicate key value violates unique constraint "materia_materialegislativa_tipo_id_2646a902479b4205_uniq" |
|
|
# duplicate key value violates unique constraint |
|
|
|
|
|
# "materia_materialegislativa_tipo_id_2646a902479b4205_uniq" |
|
|
# DETAIL: Key (tipo_id, numero, ano)=(2, 1, 2015) already exists. |
|
|
# DETAIL: Key (tipo_id, numero, ano)=(2, 1, 2015) already exists. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class FormularioCadastroView(FormMixin, GenericView): |
|
|
class FormularioCadastroView(FormMixin, GenericView): |
|
|
template_name = "materia/formulario_cadastro.html" |
|
|
template_name = "materia/formulario_cadastro.html" |
|
|
|
|
|
|
|
|