Mercurial > piecrust2
comparison piecrust/serving/util.py @ 663:3ceeca7bb71c
themes: Add support for a `--theme` argument to `chef`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 01 Mar 2016 22:27:28 -0800 |
parents | 657384f08ca3 |
children | 81d9c3a3a0b5 |
comparison
equal
deleted
inserted
replaced
662:cbd5cdec0695 | 663:3ceeca7bb71c |
---|---|
14 | 14 |
15 | 15 |
16 logger = logging.getLogger(__name__) | 16 logger = logging.getLogger(__name__) |
17 | 17 |
18 | 18 |
19 def get_app_for_server(root_dir, debug=False, sub_cache_dir=None, | 19 def get_app_for_server(root_dir, debug=False, theme_site=False, |
20 root_url='/'): | 20 sub_cache_dir=None, root_url='/'): |
21 app = PieCrust(root_dir=root_dir, debug=debug) | 21 app = PieCrust(root_dir=root_dir, debug=debug, theme_site=theme_site) |
22 if sub_cache_dir: | 22 if sub_cache_dir: |
23 app._useSubCacheDir(sub_cache_dir) | 23 app._useSubCacheDir(sub_cache_dir) |
24 app.config.set('site/root', root_url) | 24 app.config.set('site/root', root_url) |
25 app.config.set('server/is_serving', True) | 25 app.config.set('server/is_serving', True) |
26 return app | 26 return app |