﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21764	Tutorial 5 typo in example session	Don.Morton@…	nobody	"Hello, I believe there is a typo in your sample code at

[https://docs.djangoproject.com/en/1.6/intro/tutorial05/]

Under ""The Django test client"" section, there is a code box of interactive stuff.  The large code box is prefaced with, ""With that ready, we can ask the client to do some work for us:""

and the last statement in the code box looks like:


{{{
>>> response.context['latest_poll_list']
[<Poll: Who is your favorite Beatle?>]
}}}


When I execute this, I get:



{{{
In [25]: response.context['latest_poll_list']
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/morton/DjangoTesting/mysite/<ipython-input-25-439e12041dea> in <module>()
----> 1 response.context['latest_poll_list']

TypeError: 'NoneType' object has no attribute '__getitem__'

}}}

When I look at the next section of the tutorial, they mention the item


{{{
response.context_data['latest_poll_list']
}}}


and when I try to look at that, rather than the suggested 
{{{
response.context['latest_poll_list']
}}}
 it seems to work as I would expect.

I'm just learning so maybe I'm wrong :)


"	Uncategorized	closed	Documentation	1.6	Normal	duplicate			Unreviewed	0	0	0	0	0	0
