Package trac :: Module config :: Class Option

Class Option

source code

object --+
         |
        Option
Known Subclasses:

Descriptor for configuration options on Configurable subclasses.
Instance Methods
 
accessor(self, key, default='')
Return the value of the specified option.
source code
 
__init__(self, section, name, default=None, doc='')
Create the configuration option.
source code
 
__get__(self, instance, owner) source code
 
__set__(self, instance, value) source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods
 
get_registry(compmgr=None)
Return the option registry, as a dict mapping (section, key) tuples to Option objects.
source code
Class Variables
  registry = {('attachment', 'max_size'): <IntOption [attachment...
Properties

Inherited from object: __class__

Method Details

accessor(self, key, default='')

source code 

Return the value of the specified option.

Valid default input is a string. Returns a string.

get_registry(compmgr=None)
Static Method

source code 

Return the option registry, as a dict mapping (section, key) tuples to Option objects.

If compmgr is specified, only return options for components that are enabled in the given ComponentManager.

__init__(self, section, name, default=None, doc='')
(Constructor)

source code 

Create the configuration option.

@param section: the name of the configuration section this option

belongs to

@param name: the name of the option @param default: the default value for the option @param doc: documentation of the option

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

Class Variable Details

registry

Value:
{('attachment', 'max_size'): <IntOption [attachment] "max_size">,
 ('attachment', 'render_unsafe_content'): <BoolOption [attachment] "re\
nder_unsafe_content">,
 ('authz_policy', 'authz_file'): <Option [authz_policy] "authz_file">,
 ('browser', 'color_scale'): <BoolOption [browser] "color_scale">,
 ('browser', 'downloadable_paths'): <ListOption [browser] "downloadabl\
e_paths">,
 ('browser', 'hide_properties'): <ListOption [browser] "hide_propertie\
...