Opened 10 years ago
Closed 10 years ago
#25202 closed Cleanup/optimization (fixed)
Referencing the User model missing parenthesis
| 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 (last modified by )
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, )
Change History (2)
comment:1 by , 10 years ago
| Description: | modified (diff) |
|---|---|
| Easy pickings: | set |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 5d0961fd: