Opened 13 years ago
Last modified 11 years ago
#18558 closed New feature
Supply `url` property to `HttpResponseRedirect` and `HttpResponsePermanentRedirect` — at Initial Version
| 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
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: selfLocation)
Note:
See TracTickets
for help on using tickets.