diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-12-03 13:13:58 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-12-03 15:40:58 -0600 |
commit | 7c563e91bf66b0c01dfceb65c614b0da84ed91c3 (patch) | |
tree | 9002b481acd2df89297d8e48000a84ea885879d4 /mediagoblin/app.py | |
parent | 5e5ea4a3e97c14c377b7f2a82dc7d2558c14dcee (diff) | |
download | mediagoblin-7c563e91bf66b0c01dfceb65c614b0da84ed91c3.tar.lz mediagoblin-7c563e91bf66b0c01dfceb65c614b0da84ed91c3.tar.xz mediagoblin-7c563e91bf66b0c01dfceb65c614b0da84ed91c3.zip |
Attach the MediaGoblinApp to the engine, and provide a way for models to access
This allows SQLAlchemy models to gain access to app-level configuration
without the need for global variables.
This commit sponsored by Peter Hogg. Thank you, Peter!
Diffstat (limited to 'mediagoblin/app.py')
-rw-r--r-- | mediagoblin/app.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py index 9eb2e8f2..b9846962 100644 --- a/mediagoblin/app.py +++ b/mediagoblin/app.py @@ -108,9 +108,9 @@ class MediaGoblinApp(object): # Set up the database if DISABLE_GLOBALS: - self.db_manager = setup_database(self.app_config['run_migrations']) + self.db_manager = setup_database(self) else: - self.db = setup_database(self.app_config['run_migrations']) + self.db = setup_database(self) # Quit app if need to run dbupdate ## NOTE: This is currently commented out due to session errors.. |