This commit is contained in:
Jean-Baptiste Doderlein 2024-08-13 16:10:40 +02:00
parent 5cd52ce768
commit eb5b6cb65d
2 changed files with 3 additions and 3 deletions

View file

@ -20,11 +20,11 @@ from .models import Profile, Club, Membership
class UserForm(forms.ModelForm):
def _get_validation_exclusions(self):
def get_validation_exclusions(self):
# Django usernames can only contain letters, numbers, @, ., +, - and _.
# We want to allow users to have uncommon and unpractical usernames:
# That is their problem, and we have normalized aliases for us.
return super()._get_validation_exclusions() + ["username"]
return super().get_validation_exclusions() + ["username"]
class Meta:
model = User