Add registration closed template and handler
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user