aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/deploymenthowto.rst5
-rw-r--r--docs/hackinghowto.rst2
-rw-r--r--mediagoblin/app.py6
-rw-r--r--mediagoblin/auth/lib.py2
-rw-r--r--mediagoblin/config_spec.ini2
-rw-r--r--mediagoblin/db/open.py2
-rw-r--r--mediagoblin/init/celery/__init__.py2
-rw-r--r--mediagoblin/mg_globals.py6
-rw-r--r--mediagoblin/util.py6
9 files changed, 12 insertions, 21 deletions
diff --git a/docs/deploymenthowto.rst b/docs/deploymenthowto.rst
index d943e276..f50edfb6 100644
--- a/docs/deploymenthowto.rst
+++ b/docs/deploymenthowto.rst
@@ -10,4 +10,7 @@ Step 2: ?
Step 3: Write the deployment guide and profit!
-But seriously, this is a stub since we're not quite there, yet.
+But seriously, this is a stub since we're not quite there (yet) but if
+you want to see where we are now, you can try to run the latest
+development version by following the instructions at
+:ref:`hacking-howto`.
diff --git a/docs/hackinghowto.rst b/docs/hackinghowto.rst
index 914a5135..46288882 100644
--- a/docs/hackinghowto.rst
+++ b/docs/hackinghowto.rst
@@ -60,7 +60,7 @@ requirements::
On Fedora::
yum install mongodb-server python-paste-deploy python-paste-script \
- git-core python python-devel
+ git-core python python-devel python-lxml
.. YouCanHelp::
diff --git a/mediagoblin/app.py b/mediagoblin/app.py
index ae39694f..147db09c 100644
--- a/mediagoblin/app.py
+++ b/mediagoblin/app.py
@@ -93,12 +93,6 @@ class MediaGoblinApp(object):
#######################################################
setup_globals(
- # 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'],
- email_debug_mode=app_config['email_debug_mode'],
-
- # Actual, useful to everyone objects
app=self,
db_connection=self.connection,
database=self.db,
diff --git a/mediagoblin/auth/lib.py b/mediagoblin/auth/lib.py
index 08bbdd16..6d1aec49 100644
--- a/mediagoblin/auth/lib.py
+++ b/mediagoblin/auth/lib.py
@@ -112,7 +112,7 @@ def send_verification_email(user, request):
# TODO: There is no error handling in place
send_email(
- mg_globals.email_sender_address,
+ mg_globals.app_config['email_sender_address'],
[user['email']],
# TODO
# Due to the distributed nature of GNU MediaGoblin, we should
diff --git a/mediagoblin/config_spec.ini b/mediagoblin/config_spec.ini
index b6356b0e..28be5f34 100644
--- a/mediagoblin/config_spec.ini
+++ b/mediagoblin/config_spec.ini
@@ -1,7 +1,7 @@
[mediagoblin]
# database stuff
db_host = string()
-db_name = string()
+db_name = string(default="mediagoblin")
db_port = integer()
#
diff --git a/mediagoblin/db/open.py b/mediagoblin/db/open.py
index cae33394..b6987677 100644
--- a/mediagoblin/db/open.py
+++ b/mediagoblin/db/open.py
@@ -30,7 +30,7 @@ def connect_database_from_config(app_config):
def setup_connection_and_db_from_config(app_config):
connection = connect_database_from_config(app_config)
- database_path = app_config.get('db_name', 'mediagoblin')
+ database_path = app_config['db_name']
db = connection[database_path]
models.register_models(connection)
# Could configure indexes here on db
diff --git a/mediagoblin/init/celery/__init__.py b/mediagoblin/init/celery/__init__.py
index 67c3dfa0..bfae954e 100644
--- a/mediagoblin/init/celery/__init__.py
+++ b/mediagoblin/init/celery/__init__.py
@@ -62,7 +62,7 @@ def setup_celery_from_config(app_config, global_config,
celery_mongo_settings['port'] = app_config['db_port']
if celery_settings['BROKER_BACKEND'] == 'mongodb':
celery_settings['BROKER_PORT'] = app_config['db_port']
- celery_mongo_settings['database'] = app_config.get('db_name', 'mediagoblin')
+ celery_mongo_settings['database'] = app_config['db_name']
celery_settings['CELERY_MONGODB_BACKEND_SETTINGS'] = celery_mongo_settings
diff --git a/mediagoblin/mg_globals.py b/mediagoblin/mg_globals.py
index 739f44ee..12a0e016 100644
--- a/mediagoblin/mg_globals.py
+++ b/mediagoblin/mg_globals.py
@@ -20,12 +20,6 @@ database = None
public_store = None
queue_store = None
-# Dump mail to stdout instead of sending it:
-email_debug_mode = False
-
-# Address for sending out mails
-email_sender_address = None
-
# A WorkBenchManager
workbench_manager = None
diff --git a/mediagoblin/util.py b/mediagoblin/util.py
index 7b1e4a2a..9c4d024a 100644
--- a/mediagoblin/util.py
+++ b/mediagoblin/util.py
@@ -265,9 +265,9 @@ def send_email(from_addr, to_addrs, subject, message_body):
- message_body: email body text
"""
# TODO: make a mock mhost if testing is enabled
- if TESTS_ENABLED or mg_globals.email_debug_mode:
+ if TESTS_ENABLED or mg_globals.app_config['email_debug_mode']:
mhost = FakeMhost()
- elif not mg_globals.email_debug_mode:
+ elif not mg_globals.app_config['email_debug_mode']:
mhost = smtplib.SMTP()
mhost.connect()
@@ -280,7 +280,7 @@ def send_email(from_addr, to_addrs, subject, message_body):
if TESTS_ENABLED:
EMAIL_TEST_INBOX.append(message)
- if getattr(mg_globals, 'email_debug_mode', False):
+ if mg_globals.app_config['email_debug_mode']:
print u"===== Email ====="
print u"From address: %s" % message['From']
print u"To addresses: %s" % message['To']