diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-11-14 18:12:04 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-11-14 18:12:04 -0500 |
commit | c8bcd152b8ac822a85f4e1539b3748c4461bdceb (patch) | |
tree | 8cd0267175a34ec1aed052afa8aefb20ef071643 /alembic/templates/pylons/env.py | |
parent | f576169d362694139193dc29e7d2ba9f57323809 (diff) | |
download | alembic-c8bcd152b8ac822a85f4e1539b3748c4461bdceb.tar.gz |
get env to have all the arguments before and after context is set up
Diffstat (limited to 'alembic/templates/pylons/env.py')
-rw-r--r-- | alembic/templates/pylons/env.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alembic/templates/pylons/env.py b/alembic/templates/pylons/env.py index e202cea..799ba02 100644 --- a/alembic/templates/pylons/env.py +++ b/alembic/templates/pylons/env.py @@ -4,19 +4,19 @@ Place 'pylons_config_file' into alembic.ini, and the application will be loaded from there. """ -from alembic import options, context +from alembic import config, context from paste.deploy import loadapp import logging try: # if pylons app already in, don't create a new app - from pylons import config - config['__file__'] + from pylons import config as pylons_config + pylons_config['__file__'] except: # can use config['__file__'] here, i.e. the Pylons # ini file, instead of alembic.ini - config_file = options.get_main_option('pylons_config_file') - config_file = options.config_file_name + config_file = config.get_main_option('pylons_config_file') + config_file = config.config_file_name logging.config.fileConfig(config_file) wsgi_app = loadapp('config:%s' % config_file, relative_to='.') |