From 166dc91aca21048e235dec126c0518a807fead41 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 9 Jul 2011 09:02:17 -0500 Subject: [PATCH] Add a warning to the user that registrations are disabled. --- mediagoblin/auth/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)