web/formfields.py
changeset 9821 2077c8da1893
parent 9718 927d035b6921
parent 9770 112c884b2d8d
child 10006 8391bf718485
equal deleted inserted replaced
9819:95902c0b991b 9821:2077c8da1893
   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: