Let setup_global_and_app_config call setup_globals
Let setup_global_and_app_config set the global and app config in the mg_globals already. This way, the config is available to everyone very early.
This commit is contained in:
parent
fe289be4c8
commit
cca5d55d40
@ -94,9 +94,6 @@ class MediaGoblinApp(object):
|
||||
#######################################################
|
||||
|
||||
setup_globals(
|
||||
app_config=app_config,
|
||||
global_config=global_config,
|
||||
|
||||
# TODO: No need to set these two up as globals, we could
|
||||
# just read them out of mg_globals.app_config
|
||||
email_sender_address=app_config['email_sender_address'],
|
||||
|
@ -18,6 +18,7 @@ import jinja2
|
||||
from mediagoblin import staticdirect
|
||||
from mediagoblin.init.config import (
|
||||
read_mediagoblin_config, generate_validation_report)
|
||||
from mediagoblin.mg_globals import setup_globals
|
||||
|
||||
|
||||
class Error(Exception): pass
|
||||
@ -33,6 +34,10 @@ def setup_global_and_app_config(config_path):
|
||||
if validation_report:
|
||||
raise ImproperlyConfigured(validation_report)
|
||||
|
||||
setup_globals(
|
||||
app_config=app_config,
|
||||
global_config=global_config)
|
||||
|
||||
return global_config, app_config
|
||||
|
||||
def get_jinja_loader(user_template_path=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user