equal
deleted
inserted
replaced
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: |