Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#29941 closed Cleanup/optimization (fixed)

assign to user_type variable explicitly

Reported by: Varun Mudgil Owned by: nobody
Component: Documentation Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In the examples on the permalink https://docs.djangoproject.com/en/2.1/ref/contrib/contenttypes/#django.contrib.contenttypes.models.ContentType.model_class, the example:
ContentType.objects.get(app_label="auth", model="user") should be assigned to variable user_type first because the examples that follow it use it:

user_type.model_class()

Change History (2)

comment:1 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In 0b98e8fd:

Fixed #29941 -- Fixed missing variable in docs/ref/contrib/contenttypes.txt.

Regression in b47552b445547e60cc89213f79e02333cb63f270.

comment:2 by Tim Graham <timograham@…>, 6 years ago

In 8bc244bd:

[2.1.x] Fixed #29941 -- Fixed missing variable in docs/ref/contrib/contenttypes.txt.

Regression in b47552b445547e60cc89213f79e02333cb63f270.

Backport of 0b98e8fdad48a33aa34cc84d9bf0c3cd41c56ec6 from master.

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