From a35cc4e2cdff6fee7fe34e526638e40da9a858ab Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 16 Dec 2015 18:24:56 +0100 Subject: [PATCH] Attempt a very crude way to stop new signups --- pgweb/account/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pgweb/account/forms.py b/pgweb/account/forms.py index 2c3f692d..4e9269bb 100644 --- a/pgweb/account/forms.py +++ b/pgweb/account/forms.py @@ -28,6 +28,8 @@ class SignupForm(forms.Form): def clean_username(self): username = self.cleaned_data['username'].lower() + raise forms.ValidationError("Signups are temporarily disabled") + if not re.match('^[a-z0-9_@\.-]+$', username): raise forms.ValidationError("Invalid character in user name. Only a-z, 0-9, _, @, . and - allowed.") try: -- 2.39.5