Code

Opened 5 years ago

Closed 5 years ago

#10051 closed (duplicate)

Admin site forms enforce arbitrary requirements on usernames that aren't required by the User model

Reported by: dstn@… Owned by: nobody
Component: contrib.auth Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

django/contrib/auth/forms.py : UserCreationForm and UserChangeForm both use RegexFields (DRY violation here, by the way) for the username. Shouldn't this checking be in the User model class instead? User objects created through other channels don't get these checks.

In my app I want usernames to be email addresses, and there was no problem with this until I started using the admin site to update User entries.

cheers,
dustin.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #8342, #8878 and #7591.

In the future, please search for existing tickets before opening new ones.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.