diff options
Diffstat (limited to 'mediagoblin/globals.py')
-rw-r--r-- | mediagoblin/globals.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mediagoblin/globals.py b/mediagoblin/globals.py new file mode 100644 index 00000000..59a94558 --- /dev/null +++ b/mediagoblin/globals.py @@ -0,0 +1,24 @@ +""" +In some places, we need to access the database, public_store, queue_store +""" + +############################# +# General mediagoblin globals +############################# + +# mongokit.Connection +db_connection = None + +# mongokit.Connection +database = None + +# should be the same as the +public_store = None +queue_store = None + + +def setup_globals(**kwargs): + from mediagoblin import globals as mg_globals + + for key, value in kwargs.iteritems(): + setattr(mg_globals, key, value) |