Opened 12 years ago
Last modified 10 years ago
#18558 closed New feature
Supply `url` property to `HttpResponseRedirect` and `HttpResponsePermanentRedirect` — at Version 2
Reported by: | Ram Rachum | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | hirokiky@… | 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 (last modified by )
Currently the way to get the URL that a HttpResponseRedirect
is redirecting to requires doing response['Location']
. This is not so intuitive. There's no reason to remember the HTML header name when dealing with a redirect response.
Instead I propose this property:
url = property(lambda self: self['Location'])
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Description: | modified (diff) |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → New feature |
Formatting updates.
Note:
See TracTickets
for help on using tickets.
Sorry for the butchered Python, I meant: