Mercurial > kallithea
comparison pylons_app/config/environment.py @ 469:e94f4e54dc03
tests fix, put vcs testing tarball
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 11 Sep 2010 03:35:33 +0200 |
parents | 7c978511c951 |
children | 6b934c9607e7 |
comparison
equal
deleted
inserted
replaced
468:9dd372c7166c | 469:e94f4e54dc03 |
---|---|
47 input_encoding='utf-8', default_filters=['escape'], | 47 input_encoding='utf-8', default_filters=['escape'], |
48 imports=['from webhelpers.html import escape']) | 48 imports=['from webhelpers.html import escape']) |
49 | 49 |
50 #sets the c attribute access when don't existing attribute are accessed | 50 #sets the c attribute access when don't existing attribute are accessed |
51 config['pylons.strict_tmpl_context'] = True | 51 config['pylons.strict_tmpl_context'] = True |
52 | 52 test = os.path.split(config['__file__'])[-1] == 'tests.ini' |
53 #MULTIPLE DB configs | 53 #MULTIPLE DB configs |
54 # Setup the SQLAlchemy database engine | 54 # Setup the SQLAlchemy database engine |
55 if config['debug'] and os.path.split(config['__file__'])[-1] != 'tests.ini': | 55 if config['debug'] and not test: |
56 #use query time debugging. | 56 #use query time debugging. |
57 from pylons_app.lib.timerproxy import TimerProxy | 57 from pylons_app.lib.timerproxy import TimerProxy |
58 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.', | 58 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.', |
59 proxy=TimerProxy()) | 59 proxy=TimerProxy()) |
60 else: | 60 else: |