mirror of https://github.com/django/django.git
Fixed #4618 -- Fixed error in django.contrib.redirects new_path handling. Thanks, cephelo@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
18619a11ee
commit
13216e12dd
|
@ -19,7 +19,7 @@ class RedirectFallbackMiddleware(object):
|
|||
except Redirect.DoesNotExist:
|
||||
pass
|
||||
if r is not None:
|
||||
if r == '':
|
||||
if r.new_path == '':
|
||||
return http.HttpResponseGone()
|
||||
return http.HttpResponsePermanentRedirect(r.new_path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue