Hello, Last week I have discovered that some of the apps composing PyCon backend [2] have been exposed on "code.google.com". I am especially interested by "django-survey" [1] since I have been working recently on something similar [3]. I like how the survey from is built using the newforms. I have been myself unable to do it and this even with the several posts done around newforms. :-( I found two roadblocks on my way to do this. The first one is to be able to present the choices with different widgets : * Radio List * Checkbox List * Combobox * ... And the second is to be able to change the layout of each widget. For example I would like to be able to display the Radio List horizontally and vertically.
The project actually available there [2] partially solved the first issue but not the second. I try this afternoon to extend the foms.py [4] to add ChoiceCheckbox : """ class ChoiceCheckbox(ChoiceAnswer): def __init__(self, *args, **kwdargs): super(ChoiceCheckbox, self).__init__(*args, **kwdargs) self.fields['answer'].widget = CheckboxSelectMultiple(choices=self.choices) """ Then I have also edited a tuple and a dictionary to enable this new type of question. And : "oh surprise !!" I can now add this type of question in the admin interface. The survey with this type of question is nicely rendered but I am unable to submit it succesfully . I am getting this error message : """ Select a valid choice. That choice is not one of the available choices. """ I hope that one of the core developers of "django-survey" is reading this list. Please do not hesitate to let me know if there is a more appropriate channel to discuss about django-survey. --yml [1] http://code.google.com/p/django-survey/ [2] https://pycon.coderanger.net/ [3] https://launchpad.net/django-survey [4] http://code.google.com/p/django-survey/source/browse/trunk/survey/forms.py --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---