From c3983788fe6a990d28b8ea38d7f937e1b44461ed Mon Sep 17 00:00:00 2001 From: Lincoln de Sousa Date: Mon, 13 Aug 2007 15:08:24 -0300 Subject: [PATCH] adicionando lista de palestrantes no cadastro de palestra (para o caso de existir mais de um palestrante) --- forms.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forms.py b/forms.py index bd94a5f..13c1d0f 100644 --- a/forms.py +++ b/forms.py @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. from django import newforms as forms from django.newforms.widgets import Textarea, PasswordInput from eventmanager.eventos.models import \ - AreaDeInteresse, CategoriaPalestra, STATE_CHOICES + AreaDeInteresse, CategoriaPalestra, Palestrante, STATE_CHOICES MKCHOICES = lambda K:[(x.id, str(x)) for x in K.objects.all()] @@ -31,6 +31,9 @@ class InscreverPalestra(forms.Form): newchoices = MKCHOICES(CategoriaPalestra) self.fields['categoria'].choices = newchoices + newchoices = MKCHOICES(Palestrante) + self.fields['palestrantes'].choices = newchoices + titulo = forms.CharField(max_length=100) tema = forms.CharField(max_length=100) categoria = forms.ChoiceField() @@ -39,6 +42,8 @@ class InscreverPalestra(forms.Form): descricao_longa = forms.CharField(widget=Textarea(), label='Descrição longa') + palestrantes = forms.MultipleChoiceField() + class CadastroPalestrante(forms.Form): def __init__(self, *args, **kwargs): -- 2.20.1