Browse Source

Remove HorizontalRadioRenderer de sessão e refatora TramitacaoAdmDeleteView

pull/261/head
Edward Ribeiro 9 years ago
parent
commit
4cb168b9a9
  1. 11
      materia/forms.py
  2. 2
      protocoloadm/views.py
  3. 1
      sessao/views.py

11
materia/forms.py

@ -2,7 +2,6 @@ from crispy_forms.helper import FormHelper
from crispy_forms.layout import Column, Fieldset, Layout, Submit
from django import forms
from django.forms import ModelForm
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
import crispy_layout_mixin
@ -13,8 +12,8 @@ from parlamentares.models import Parlamentar, Partido
from .models import (AcompanhamentoMateria, Anexada, Autor, Autoria,
DespachoInicial, DocumentoAcessorio, MateriaLegislativa,
Numeracao, Origem, Proposicao, Relatoria,
StatusTramitacao, TipoAutor, TipoDocumento,
TipoMateriaLegislativa, Tramitacao, UnidadeTramitacao)
StatusTramitacao, TipoAutor, TipoMateriaLegislativa,
Tramitacao, UnidadeTramitacao)
EM_TRAMITACAO = [('', _('Tanto Faz')),
(True, 'Sim'),
@ -24,12 +23,6 @@ ORDENACAO_MATERIAIS = [(1, 'Crescente'),
(2, 'Decrescente')]
class HorizontalRadioRenderer(forms.RadioSelect.renderer):
def render(self):
return mark_safe(u' '.join([u'%s ' % w for w in self]))
class ProposicaoForm(ModelForm):
tipo_materia = forms.ModelChoiceField(

2
protocoloadm/views.py

@ -639,7 +639,7 @@ class TramitacaoAdmEditView(FormMixin, GenericView):
return self.form_invalid(form)
class TramitacaoAdmDeleteView(FormMixin, GenericView):
class TramitacaoAdmDeleteView(DetailView):
template_name = "protocoloadm/tramitacao.html"

1
sessao/views.py

@ -2235,7 +2235,6 @@ class PautaSessaoDetailView(sessao_crud.CrudDetailView):
class SessaoCadastroView(CreateView):
template_name = "sessao/sessao_cadastro.html"
form_class = SessaoForm
success_url = reverse_lazy('sessaoplenaria:list_sessao')

Loading…
Cancel
Save