Created
November 8, 2013 11:30
-
-
Save kezabelle/7369739 to your computer and use it in GitHub Desktop.
For omarek on IRC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyForm(Form): | |
value = forms.ChoiceField(choices=()) | |
def __init__(self, *args, **kwargs): | |
super(MyForm, self).__init__(*args, **kwargs) | |
self.fields['value'].choices = get_choices(please_select='Please select:') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment