web/formfields.py
changeset 9770 112c884b2d8d
parent 9444 6012cf57f48e
parent 9701 46c8d8701240
child 9821 2077c8da1893
child 11065 c7dbd10648e6
equal deleted inserted replaced
9765:5607ef9ab9f5 9770:112c884b2d8d
   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: