Created
September 27, 2012 06:00
-
-
Save mitjap/3792437 to your computer and use it in GitHub Desktop.
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 LocationsForm(forms.Form): | |
locations = forms.ChoiceField(choices=locationsChoices(), label='', required=False) | |
def locationsChoices(): | |
return itertools.chain((('', _("Don't mock location")),(("%s-%s" % (backend.get_full_name(), node.id), node.name) for backend, node in nodes.get_all_nodes_with_backends()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
File "/home/mitjap/Projects/issue/PiplMesh/piplmesh/frontend/forms.py", line 18, in
class LocationsForm(forms.Form):
File "/home/mitjap/Projects/issue/PiplMesh/piplmesh/frontend/forms.py", line 20, in LocationsForm
locations = forms.ChoiceField(choices=locationsChoices(), label='', required=False)
NameError: name 'locationsChoices' is not defined