diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-27 08:25:22 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-05-27 08:25:22 -0700 |
commit | bcd10ad6633d90b5feae4f5dec8cf5d5754d51b5 (patch) | |
tree | 23dce33e5deaf33340f25d816ec309e39560d305 /mediagoblin/tools/mail.py | |
parent | f339b76a4ee04571bd0a94d20a5d53d7f3d8d235 (diff) | |
parent | 1d321f1c7158f3bd263d64ae703311e8d8e2a22a (diff) | |
download | mediagoblin-bcd10ad6633d90b5feae4f5dec8cf5d5754d51b5.tar.lz mediagoblin-bcd10ad6633d90b5feae4f5dec8cf5d5754d51b5.tar.xz mediagoblin-bcd10ad6633d90b5feae4f5dec8cf5d5754d51b5.zip |
Merge branch 'pre-auth' into basic_auth
Conflicts:
mediagoblin/auth/tools.py
mediagoblin/auth/views.py
mediagoblin/db/migrations.py
mediagoblin/plugins/basic_auth/lib.py
mediagoblin/plugins/httpapiauth/__init__.py
mediagoblin/plugins/piwigo/views.py
Diffstat (limited to 'mediagoblin/tools/mail.py')
-rw-r--r-- | mediagoblin/tools/mail.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/mediagoblin/tools/mail.py b/mediagoblin/tools/mail.py index 4fa02ce5..6886c859 100644 --- a/mediagoblin/tools/mail.py +++ b/mediagoblin/tools/mail.py @@ -16,7 +16,7 @@ import smtplib from email.MIMEText import MIMEText -from mediagoblin import mg_globals +from mediagoblin import mg_globals, messages from mediagoblin.tools import common ### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -135,3 +135,16 @@ def normalize_email(email): return None email = "@".join((em_user, em_dom.lower())) return email + + +def email_debug_message(request): + """ + If the server is running in email debug mode (which is + the current default), give a debug message to the user + so that they have an idea where to find their email. + """ + if mg_globals.app_config['email_debug_mode']: + # DEBUG message, no need to translate + messages.add_message(request, messages.DEBUG, + u"This instance is running in email debug mode. " + u"The email will be on the console of the server process.") |