Ticket #8288 (closed enhancement: duplicate)
Opened 3 years ago
Last modified 3 years ago
Variable substitution and other goodies in trac.ini
| Reported by: | alvaro.iradier@… | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.12dev |
| Severity: | normal | Keywords: | config variables inherit |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
It would be useful to include some variable substitutions when processing trac.ini.
Example ONE
[trac]
authz_module_name = ${PROJECT_NAME}
would translate ${PROJECT_NAME} into the short project name (the folder name).
¿What situation would this be useful in?
Considering in some setups, where using a parent environments folder, and a parent subversion repository folder, where each trac env uses a different subversion repo (usually with the same name), this authz_module_name option would be included in the global trac.ini and inherited by all projects.
Example TWO
Inherit the value defined in the global trac.ini, like:
[trac]
repository_dir = ${INHERIT}/transporte
So, the global trac.ini could define the base parent repository_dir, and each project the subdirectory. If the parent SVN folder is moved or renamed, only changing the global trac.ini is necessary.
Please add more examples and situations where this could be useful.
Attachments
Change History
comment:1 Changed 3 years ago by ebray
comment:2 Changed 3 years ago by osimons
- Resolution set to duplicate
- Status changed from new to closed
The need has been raised at various times, and I'm going to close this as a duplicate of #7573 and make a note on that ticket about these suggestions.



I like the syntax buildout uses for this: ${section:option}. Would definitely be useful to me.