Add registration closed template and handler

This commit is contained in:
2022-11-03 07:20:30 +00:00
parent 8a6ca7c2c9
commit d805a39466
2 changed files with 23 additions and 0 deletions

View File

@@ -91,6 +91,10 @@ class Signup(CreateView):
success_url = reverse_lazy("login")
template_name = "registration/signup.html"
def get(self, request, *args, **kwargs):
if not settings.REGISTRATION_OPEN:
return render(request, "registration/registration_closed.html")
super().get(request, *args, **kwargs)
class Portal(LoginRequiredMixin, View):
async def get(self, request):