Opened 2 years ago

Closed 2 years ago

#20460 closed Cleanup/optimization (duplicate)

Documentation for customer user models should warn about naming it User

Reported by: mjtamlyn Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords: contrib.auth, swappable user
Cc: mjtamlyn 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 2 years ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.4 to 1.5

comment:2 Changed 2 years ago by anonymous

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

comment:3 Changed 2 years ago by mjtamlyn

  • Resolution set to duplicate
  • Status changed from new to closed

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

Closing.

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