#35737: Missing import statement in tutorial
--------------------------+-----------------------------------------
Reporter: Mariatta | Type: Bug
Status: new | Component: Documentation
Version: 5.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------+-----------------------------------------
On this tutorial:
https://docs.djangoproject.com/en/5.1/intro/tutorial07/#id8
It is missing the import for `models` which is used to define the
`Question` model.
{{{#!python
from django.db import models
}}}
Not adding the import statement could be confusing to the new learners,
because throughout the tutorials, it uses `models` from both
django.db.models and `polls.models`. On the previous examples of this
tutorial page, it uses `models` imported from the `polls` app, so it would
be useful to remind new learners that we're extending the `models.Model`
from `django.db` and not the one from the `polls.models`.
The same issue seems to appear in v 4 as well. I didn't check the earlier
versions.
If you'd agree this is worth fixing, I can open a PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/35737>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070191c37030e1-16ffdd74-7786-4da5-80a6-847094d4168b-000000%40eu-central-1.amazonses.com.