I notices that in a number of places the following expression is used:
{{{
response.context['latest_question_list']
}}}
This doesn't work, and I think that instead there should be
{{{
response.context_data['latest_question_list']
}}}
I'm using Django 4.1.6
Brgds,
Vitalija
--
Ticket URL: <https://code.djangoproject.com/ticket/34334>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: (none) => nobody
* resolution: => duplicate
* status: new => closed
* component: Error reporting => Documentation
Comment:
Duplicate of #22912. Please re-read the tutorial's mention of
`setup_test_environment()` and make sure you call it.
--
Ticket URL: <https://code.djangoproject.com/ticket/34334#comment:1>
Comment (by alv2017):
Replying to [comment:1 Tim Graham]:
> Duplicate of #22912. Please re-read the tutorial's mention of
`setup_test_environment()` and make sure you call it.
Hmm... What about the actual tests?
--
Ticket URL: <https://code.djangoproject.com/ticket/34334#comment:2>
Comment (by Tim Graham):
Django's test runner calls `setup_test_environment()`. Is it not working
for you?
--
Ticket URL: <https://code.djangoproject.com/ticket/34334#comment:3>
Comment (by alv2017):
Replying to [comment:3 Tim Graham]:
> Django's test runner calls `setup_test_environment()`. Is it not working
for you?
Thanks for the explanation Tim. I didn't realize at the beginning that
setup_test_environment() is running under the hood when tests are run.
--
Ticket URL: <https://code.djangoproject.com/ticket/34334#comment:4>