Mercurial > hg > bitsyblog
diff bitsyblog/factory.py @ 52:3ddb2ca12178
allow for multiple template directories
author | k0s <k0scist@gmail.com> |
---|---|
date | Sat, 26 Dec 2009 21:52:55 -0500 |
parents | cf77bd13aad9 |
children | b97d11e2cf41 |
line wrap: on
line diff
--- a/bitsyblog/factory.py Sat Dec 26 21:45:28 2009 -0500 +++ b/bitsyblog/factory.py Sat Dec 26 21:52:55 2009 -0500 @@ -3,10 +3,11 @@ from getpass import getpass from paste.httpexceptions import HTTPExceptionHandler +# accepted configuration keys, e.g. 'bitsyblog.file_dir' +config = [ 'file_dir', 'date_format', 'subject', 'n_links', 'help_file', 'header', 'template_directories' ] + def factory(global_conf, **app_conf): """make bitsyauth app and wrap it in middleware""" - - config = [ 'file_dir', 'date_format', 'subject', 'n_links', 'help_file' ] key_str = 'bitsyblog.%s' args = dict([ (key, app_conf[ key_str % key]) for key in config if app_conf.has_key(key_str % key) ]) @@ -17,7 +18,6 @@ def bitsierfactory(global_conf, **app_conf): """make single-user bitsyblog""" - config = [ 'file_dir', 'date_format', 'subject', 'n_links', 'help_file', 'header' ] key_str = 'bitsyblog.%s' args = dict([ (key, app_conf[ key_str % key]) for key in config if app_conf.has_key(key_str % key) ])