Opened 12 years ago
Closed 12 years ago
#21017 closed Uncategorized (invalid)
code error in v1.5 tutorial 5
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Documentation | Version: | 1.5 | 
| Severity: | Normal | Keywords: | |
| Cc: | rzjint1@… | Triage Stage: | Accepted | 
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
>>> response.context['latest_poll_list'] [<Poll: Who is your favorite Beatle?>] should be response.context_data
Change History (2)
comment:1 by , 12 years ago
| Triage Stage: | Unreviewed → Accepted | 
|---|
comment:2 by , 12 years ago
| Resolution: | → invalid | 
|---|---|
| Status: | new → closed | 
Unless I'm missing something, the tutorial is correct as-is. Here's the relevant documentation:
https://docs.djangoproject.com/en/dev/topics/testing/overview/#django.test.client.Response.context
Making the suggested change results in AttributeError: 'HttpResponse' object has no attribute 'context_data'
  Note:
 See   TracTickets
 for help on using tickets.
    
This seems to also apply to 1.6 and master