diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-04-05 18:00:08 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-04-05 18:00:08 (GMT) |
commit | fd027128f9173725ea7300f5928733321dfeacea (patch) | |
tree | 990865057aafc9b68d11463b702ee1592b2397ec /webapp/polls/forms.py | |
parent | c373d56209923065411cfa58dab63d841db7b5f2 (diff) |
Pollster asignation in poll form
Diffstat (limited to 'webapp/polls/forms.py')
-rw-r--r-- | webapp/polls/forms.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/polls/forms.py b/webapp/polls/forms.py index 45f2aa5..86dfacb 100644 --- a/webapp/polls/forms.py +++ b/webapp/polls/forms.py @@ -6,6 +6,7 @@ from utils.forms import BadFormValidation from utils.mongo_connection import get_db from polls.models import Poll +from pollster.models import Pollster class PollAddForm(forms.Form): @@ -17,6 +18,11 @@ class PollAddForm(forms.Form): required=False, choices=[c for c in Poll.status_choices()] + [('', '')], label="Estado") + pollster = forms.ChoiceField( + required=False, + choices=[('', '-')] + [(p.id, p.username) for p in Pollster.all()], + label="Encuestador asignado" + ) def clean_name(self): id = self.cleaned_data['id'] |