Package trac :: Module config :: Class Option

Class Option

source code

object --+
         |
        Option
Known Subclasses:

Descriptor for configuration options.
Instance Methods
 
accessor(self, section, name, default) source code
 
__init__(self, section, name, default=None, doc='', doc_domain='tracini')
Create the configuration option.
source code
 
__get__(self, instance, owner) source code
 
__set__(self, instance, value) source code
 
__repr__(self)
repr(x)
source code
 
dumps(self, value)
Return the value as a string to write to a trac.ini file
source code

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

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

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='', doc_domain='tracini')
(Constructor)

source code 
Create the configuration option.
Parameters:
  • section - the name of the configuration section this option belongs to
  • name - the name of the option
  • default - the default value for the option
  • 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', 'max_zip_size'): <IntOption [attachment] "max_zip_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\
...