Version 1 (modified by 13 years ago) ( diff ) | ,
---|
Configuration (trac.ini) API
Most of Trac's configuration is stored in the trac.ini file. Trac provides an API to retrieve and set the settings in this configuration file.
For the sake of this article, here's a quick reminder of the structure of trac.ini
:
[wiki] ; <= section ignore_missing_pages = false ; <= option with option value max_size = 262144 render_unsafe_content = false
The file consists of multiple sections (written as [sectionname]
). Each section consists of multiple options with their option values (like ignore_missing_pages = false
in the example above). All options that come after the beginning of a section belong to this section - until a new section begins.
Retrieving arbitrary option values
Setting arbitrary option values
Defining new options
Retrieving the value of previously defined options
Note:
See TracWiki
for help on using the wiki.