Code

#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.

Attachments (0)

Change History (3)

comment:1 Changed 11 months 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 11 months ago by anonymous

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

comment:3 Changed 11 months ago by mjtamlyn

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

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

Closing.

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.