Project

Profile

Help

Issue #8260

closed

Use get_user_model instead of auth.models.user

Added by ipanova@redhat.com almost 2 years ago. Updated almost 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
GalaxyNG
Sprint:
Sprint 90
Quarter:

Description

mporting and using django.contrib.auth.models.User breaks any apps that use custom user models defined in AUTH_USER_MODEL. To prevent this from happening, the User model should be loaded using django's get_user_model() function.

See https://docs.djangoproject.com/en/3.1/topics/auth/customizing/#referencing-the-user-model for details

Also available in: Atom PDF