1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Fixed #18558 -- Added url property to HttpResponseRedirect*

Thanks coolRR for the report.
This commit is contained in:
Hiroki Kiyohara
2013-02-13 09:55:43 +01:00
committed by Claude Paroz
parent 3a002db6f1
commit e94f405d94
15 changed files with 82 additions and 66 deletions

View File

@@ -392,6 +392,8 @@ class HttpResponseRedirectBase(HttpResponse):
super(HttpResponseRedirectBase, self).__init__(*args, **kwargs)
self['Location'] = iri_to_uri(redirect_to)
url = property(lambda self: self['Location'])
class HttpResponseRedirect(HttpResponseRedirectBase):
status_code = 302