Add a warning to the user that registrations are disabled.
This commit is contained in:
parent
d41cc42a66
commit
166dc91aca
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user