diff --git a/colab/accounts/forms.py b/colab/accounts/forms.py index 113c5fd..48df1ce 100644 --- a/colab/accounts/forms.py +++ b/colab/accounts/forms.py @@ -198,12 +198,10 @@ class UserCreationForm(UserForm): username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^[\w.@+-]+$', help_text=_(("Required. 30 characters or fewer" - ". Letters, digits and " - "@/./+/-/_ only.")), + ". Letter and digits.")), error_messages={ 'invalid': _(("This value may contain only" - " letters, numbers and " - "@/./+/-/_ characters."))}) + " letters and numbers."))}) password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) password2 = forms.CharField(label=_("Password confirmation"), @@ -252,12 +250,10 @@ class UserCreationForm(UserForm): class UserChangeForm(forms.ModelForm): username = forms.RegexField( - label=_("Username"), max_length=30, regex=r"^[\w.@+-]+$", - help_text=_("Required. 30 characters or fewer. Letters, digits and " - "@/./+/-/_ only."), + label=_("Username"), max_length=30, regex=r"^[\w*]", + help_text=_("Required. 30 characters or fewer. Letters and digits."), error_messages={ - 'invalid': _("This value may contain only letters, numbers and " - "@/./+/-/_ characters.")}) + 'invalid': _("This value may contain only letters and numbers.")}) password = ReadOnlyPasswordHashField(label=_("Password"), help_text=_("Raw passwords are not" " stored, so there is no" diff --git a/colab/accounts/models.py b/colab/accounts/models.py index 7a7a00e..6de95c1 100644 --- a/colab/accounts/models.py +++ b/colab/accounts/models.py @@ -82,8 +82,7 @@ class User(AbstractUser): # without having to rewrite all AbstractUser here User._meta.get_field('email')._unique = True User._meta.get_field('username').help_text = _( - u'Required. 30 characters or fewer. Letters, digits and ' - u'./+/-/_ only.' + u'Required. 30 characters or fewer. Letters and digits.' ) User._meta.get_field('username').validators[0] = validators.RegexValidator( r'^\w+$', diff --git a/colab/locale/pt_BR/LC_MESSAGES/django.mo b/colab/locale/pt_BR/LC_MESSAGES/django.mo index 7bf52d2..e1cf23a 100644 Binary files a/colab/locale/pt_BR/LC_MESSAGES/django.mo and b/colab/locale/pt_BR/LC_MESSAGES/django.mo differ diff --git a/colab/locale/pt_BR/LC_MESSAGES/django.po b/colab/locale/pt_BR/LC_MESSAGES/django.po index 2dfc1f8..8cb6132 100644 --- a/colab/locale/pt_BR/LC_MESSAGES/django.po +++ b/colab/locale/pt_BR/LC_MESSAGES/django.po @@ -1281,6 +1281,11 @@ msgstr "" "Outro exemplo de uso com relacionamento. Usado para recuperar todos as " "mensagem de um dado usuário usando o campo username ou email" + +#: colab/accounts/forms.py:276 +msgid "This value may contain only letters and numbers." +msgstr "Esse campo só pode conter letras e/ou numeros." + #~ msgid "Please correct the errors below and try again" #~ msgstr "Por favor, corrija os erros abaixo e tente novamente" -- libgit2 0.21.2