diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-09 09:02:17 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-09 09:02:17 -0500 |
commit | 166dc91aca21048e235dec126c0518a807fead41 (patch) | |
tree | e3c316f03dad4680da4f54b9e3005ae2052bf2e4 | |
parent | d41cc42a66dd6f8e9db126b9724bde62b7c6f3a8 (diff) | |
download | mediagoblin-166dc91aca21048e235dec126c0518a807fead41.tar.lz mediagoblin-166dc91aca21048e235dec126c0518a807fead41.tar.xz mediagoblin-166dc91aca21048e235dec126c0518a807fead41.zip |
Add a warning to the user that registrations are disabled.
-rw-r--r-- | mediagoblin/auth/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 01bfc066..7facc1bf 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -31,9 +31,12 @@ def register(request): """ Your classic registration view! """ - # Redirects to indexpage if registrations are disabled if not mg_globals.app_config["allow_registration"]: + messages.add_message( + request, + messages.WARNING, + ('Sorry, registration is disabled on this instance.')) return redirect(request, "index") register_form = auth_forms.RegistrationForm(request.POST) |