web/formfields.py
branchstable
changeset 9701 46c8d8701240
parent 9283 5f2c5eb1a820
child 9770 112c884b2d8d
equal deleted inserted replaced
9700:da7d341cca76 9701:46c8d8701240
   380     def vocabulary(self, form, **kwargs):
   380     def vocabulary(self, form, **kwargs):
   381         """return vocabulary for this field. This method will be
   381         """return vocabulary for this field. This method will be
   382         called by widgets which requires a vocabulary.
   382         called by widgets which requires a vocabulary.
   383 
   383 
   384         It should return a list of tuple (label, value), where value
   384         It should return a list of tuple (label, value), where value
   385         *must be an unicode string*, not a typed value.
   385         *must be a unicode string*, not a typed value.
   386         """
   386         """
   387         assert self.choices is not None
   387         assert self.choices is not None
   388         if callable(self.choices):
   388         if callable(self.choices):
   389             # pylint: disable=E1102
   389             # pylint: disable=E1102
   390             if getattr(self.choices, 'im_self', None) is self:
   390             if getattr(self.choices, 'im_self', None) is self: