adicionando lista de palestrantes no cadastro de palestra (para o caso de existir...
authorLincoln de Sousa <pythonwarrior@pidinti.localdomain>
Mon, 13 Aug 2007 18:08:24 +0000 (15:08 -0300)
committerLincoln de Sousa <pythonwarrior@pidinti.localdomain>
Mon, 13 Aug 2007 18:08:24 +0000 (15:08 -0300)
forms.py

index bd94a5f..13c1d0f 100644 (file)
--- 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 \
 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()]
 
 
 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(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()
     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')
 
     descricao_longa = forms.CharField(widget=Textarea(),
         label='Descrição longa')
 
+    palestrantes = forms.MultipleChoiceField()
+
 
 class CadastroPalestrante(forms.Form):
     def __init__(self, *args, **kwargs):
 
 class CadastroPalestrante(forms.Form):
     def __init__(self, *args, **kwargs):