Add in some new settings.

This commit is contained in:
Isaac Bythewood
2012-08-01 21:30:18 +00:00
parent 5854c6dd49
commit f00e106dfe
8 changed files with 64 additions and 5 deletions

View File

@@ -12,10 +12,14 @@ def home(request):
return HttpResponseRedirect(reverse('pins:recent-pins'))
def private(request):
return TemplateResponse(request, 'core/private.html', None)
def register(request):
if not settings.ALLOW_NEW_REGISTRATIONS:
messages.error(request, "The admin of this service is currently not "
"allowing new users to register.")
messages.error(request, "The admin of this service is not "
"allowing new registrations.")
return HttpResponseRedirect(reverse('pins:recent-pins'))
if request.method == 'POST':
form = UserCreationForm(request.POST)