Opened 9 years ago
Last modified 9 years ago
#25202 closed Cleanup/optimization
Referencing the User model missing parenthesis — at Initial Version
Reported by: | Jeff Schulthies | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#referencing-the-user-model\
Referencing the User model. The example is missing a parenthesis.
from django.conf import settings
from django.db import models
class Article(models.Model):
author = models.ForeignKey
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
)
Corrected:
from django.conf import settings
from django.db import models
class Article(models.Model):
author = models.ForeignKey(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
)