Opened 16 years ago
Closed 16 years ago
#10971 closed (fixed)
Test client response.redirect_chain documentation example missing follow argument
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)]
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