Opened 4 years ago

Closed 4 years ago

#20460 closed Cleanup/optimization (duplicate)

Documentation for customer user models should warn about naming it User

Reported by: Marc Tamlyn Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords: contrib.auth, swappable user
Cc: Marc Tamlyn Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

If you swap in a customer user model where the name of the class is not User, and you are using PermissionsMixin, then (for example) the Group model will no longer have a user_set related object descriptor. This should be documented as a warning when using custom user models with the PermissionsMixin, and suggest that the fix (may be) to use a modified PermissionsMixin which specifies the related_name exactly.

Change History (3)

comment:1 Changed 4 years ago by Tim Graham

Triage Stage: UnreviewedAccepted
Version: 1.41.5

comment:2 Changed 4 years ago by anonymous

There is a related to ticket 20244 that seeks to solve this issue.

comment:3 Changed 4 years ago by Marc Tamlyn

Resolution: duplicate
Status: newclosed

Cool, we'll go with Russell's comments on 20244.

Closing.

Note: See TracTickets for help on using tickets.
Back to Top