[Django] #30775: Tutorial part 5 testing often encounters import errors

7 views
Skip to first unread message

Django

unread,
Sep 13, 2019, 10:52:09 PM9/13/19
to django-...@googlegroups.com
#30775: Tutorial part 5 testing often encounters import errors
-------------------------------------+-------------------------------------
Reporter: Katie | Owner: Katie McLaughlin
McLaughlin |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: 2.2
Documentation |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
As reported via the contact form (thanks Tom R.!), people completing the
tutorial often get stuck in Part 5 when running their first tests

https://stackoverflow.com/questions/14719883/django-can-not-get-a-time-
function-timezone-datetime-to-work-properly-gett

The issue is that there is an import line hiding in Part 2 "Playing with
the API" where imports are added to the polls/models.py that are often
missed, generating a different error when running the tests than what is
expected by that part of the tutorial.

I already have a patch for this :)

--
Ticket URL: <https://code.djangoproject.com/ticket/30775>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 13, 2019, 10:53:49 PM9/13/19
to django-...@googlegroups.com
#30775: Tutorial part 5 testing often encounters import errors
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
Type: | McLaughlin
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Katie McLaughlin):

https://github.com/django/django/pull/11781

--
Ticket URL: <https://code.djangoproject.com/ticket/30775#comment:1>

Django

unread,
Sep 14, 2019, 3:45:22 AM9/14/19
to django-...@googlegroups.com
#30775: Tutorial part 5 testing often encounters import errors
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
Type: | McLaughlin
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* has_patch: 0 => 1
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30775#comment:2>

Django

unread,
Sep 16, 2019, 4:04:14 AM9/16/19
to django-...@googlegroups.com
#30775: Tutorial part 5 testing often encounters import errors
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
Type: | McLaughlin
Cleanup/optimization | Status: closed
Component: Documentation | Version: 2.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"44077985f58be02214a11ffde35776fed3c960e1" 44077985]:
{{{
#!CommitTicketReference repository=""
revision="44077985f58be02214a11ffde35776fed3c960e1"
Fixed #30775 -- Added admonition about missing imports to "Running tests"
section in tutorial 5.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30775#comment:3>

Django

unread,
Sep 16, 2019, 4:04:55 AM9/16/19
to django-...@googlegroups.com
#30775: Tutorial part 5 testing often encounters import errors
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
Type: | McLaughlin
Cleanup/optimization | Status: closed
Component: Documentation | Version: 2.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"14125bb039a835a6297c0abd1ee4f4a9ad062f84" 14125bb]:
{{{
#!CommitTicketReference repository=""
revision="14125bb039a835a6297c0abd1ee4f4a9ad062f84"
[3.0.x] Fixed #30775 -- Added admonition about missing imports to "Running


tests" section in tutorial 5.

Backport of 44077985f58be02214a11ffde35776fed3c960e1 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30775#comment:4>

Django

unread,
Sep 16, 2019, 4:05:55 AM9/16/19
to django-...@googlegroups.com
#30775: Tutorial part 5 testing often encounters import errors
-------------------------------------+-------------------------------------
Reporter: Katie McLaughlin | Owner: Katie
Type: | McLaughlin
Cleanup/optimization | Status: closed
Component: Documentation | Version: 2.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"242805c82be5ae9109b4b14335bcad3a3870571d" 242805c8]:
{{{
#!CommitTicketReference repository=""
revision="242805c82be5ae9109b4b14335bcad3a3870571d"
[2.2.x] Fixed #30775 -- Added admonition about missing imports to "Running


tests" section in tutorial 5.

Backport of 44077985f58be02214a11ffde35776fed3c960e1 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30775#comment:5>

Reply all
Reply to author
Forward
0 new messages