Package s3 :: Module s3widgets :: Class S3FixedOptionsWidget
[frames] | no frames]

Class S3FixedOptionsWidget

source code

??-288 --+
         |
        S3FixedOptionsWidget

Non-introspective options widget

Instance Methods
 
__init__(self, options, translate=False, sort=True, empty=True)
Constructor
source code
 
__call__(self, field, value, **attributes) source code
Method Details

__init__(self, options, translate=False, sort=True, empty=True)
(Constructor)

source code 

Constructor

Parameters:
  • options - the options for the widget, either as iterable of tuples (value, representation) or as dict {value:representation}, or as iterable of strings if value is the same as representation
  • translate - automatically translate the representation
  • sort - alpha-sort options (by representation)
  • empty - add an empty-option (to select none of the options)

__call__(self, field, value, **attributes)
(Call operator)

source code