marcinkuzminski/rhodecode — pull request #3 by cluck (2013-07-18 16:06:29+00:00)
Title: Add support for extra_templates and extra_static_files

This allows to prepend additional paths to the lookup directories for Mako templates and for static files. RhodeCode by itself only looks up files contained in it's own Egg, which complicates interface customization.

Two additional configuration options are introduced:
```
[app:main]
extra_templates = %(here)s/templates
extra_static_files = %(here)s/static
```

With the above example configuration and to override the the global layout (```base/base.html```), the web application can be laid out as follows:
* ```${WEBAPP}/development.ini``` (with added option ```extra_templates```)
* ```${WEBAPP}/templates/base/base.html``` (customized base/base.html template).

Adding static files works the same way. Both files will be accessible:
* ```${WEBAPP}/development.ini``` (with added option ```extra_static_files```)
* ```${WEBAPP}/static/css/corporate.css``` (as ```http://rhodecode/css/corporate.css```)
* ```${WEBAPP}/static/css/contextbar.css``` (overrides packaged ```public/css/contextbar.css```)
* ```${WEBAPP}/static/foo/bar.txt``` (as ```http://rhodecode/foo/bar.txt```)

Both extra_templates and extra_static_files support multiple paths. UNIX Shell syntax applies, thus list of paths must be space separed and spaces in paths can be escaped with a backslash or the paths can be quoted, e.g:
```
extra_templates =
"$(here)/templates"
/opt/rhodecode/templates
/mnt/windows/d/Documents\ and\ Settings/User3/Webapp\ 1
```