Skip to content

Files

Latest commit

 

History

History
15 lines (9 loc) · 286 Bytes

hard-coded-auth-user.md

File metadata and controls

15 lines (9 loc) · 286 Bytes

Pattern: Use of hard-coded auth.User

Issue: -

Description

Use settings.AUTH_USER_MODEL instead.

Example of incorrect code:

class PullRequest(models.Model):
    author = models.ForeignKey("auth.User", models.CASCADE)  # [hard-coded-auth-user]