#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()
Note:
See TracTickets
for help on using tickets.
In 0b98e8fd: