Opened 16 years ago
Closed 16 years ago
#10971 closed (fixed)
Test client response.redirect_chain documentation example missing follow argument
Reported by: | Charlie DeTar | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation for the django test Client includes an example for showing redirect chains which is broken.
The provided example:
>>> response = c.get('/redirect_me') >>> response.redirect_chain
results in:
AttributeError: 'HttpResponseRedirect' object has no attribute 'redirect_chain'
This is because follow
was not set to True
. The example should read:
>>> response = c.get('/redirect_me', follow=True) >>> response.redirect_chain [(u'http://testserver/next/', 302), (u'http://testserver/final/', 302)]
Attachments (1)
Change History (4)
by , 16 years ago
Attachment: | redirect_chain_docs.diff added |
---|
comment:1 by , 16 years ago
Component: | Uncategorized → Documentation |
---|
comment:2 by , 16 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Patch to fix redirect_chain documentation example