Opened 4 years ago

Closed 4 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 Baptiste Mispelon)

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 Changed 4 years ago by Baptiste Mispelon

Description: modified (diff)
Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 5d0961fd:

Fixed #25202 -- Fixed typo in docs/topics/auth/customizing.txt

Note: See TracTickets for help on using tickets.
Back to Top