From e6744ed292959d92ce5415fb6f6e545ee2dd8713 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Tue, 8 Mar 2016 16:23:08 -0300 Subject: [PATCH] Coloca as 'choices' do formulario no models, em Sessao --- sessao/forms.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sessao/forms.py b/sessao/forms.py index 253f533d9..4b2367e52 100644 --- a/sessao/forms.py +++ b/sessao/forms.py @@ -70,16 +70,6 @@ class VotacaoEditForm(forms.Form): class SessaoForm(ModelForm): - hora_inicio = forms.CharField(label=_('HorĂ¡rio Inicio'), - required=True, - widget=forms.TextInput( - attrs={'class': 'hora'})) - - hora_fim = forms.CharField(label=_('HorĂ¡rio Fim'), - required=True, - widget=forms.TextInput( - attrs={'class': 'hora'})) - class Meta: model = SessaoPlenaria fields = ['numero', @@ -97,6 +87,11 @@ class SessaoForm(ModelForm): 'url_audio', 'url_video'] + widgets = { + 'hora_inicio': forms.TextInput(attrs={'class': 'hora'}), + 'hora_fim': forms.TextInput(attrs={'class': 'hora'}), + } + def __init__(self, *args, **kwargs): row1 = crispy_layout_mixin.to_row(