forked from 0x2620/pandora
redirect
This commit is contained in:
parent
9475db0347
commit
eeddecd582
1 changed files with 5 additions and 3 deletions
|
@ -86,6 +86,8 @@ actions.register(editPage)
|
|||
def redirect_url(request, url):
|
||||
if request.META['QUERY_STRING']:
|
||||
url += "?" + request.META['QUERY_STRING']
|
||||
response = HttpResponse()
|
||||
response.write('<script>document.location.href="%s";</script>'%url)
|
||||
return response
|
||||
|
||||
if settings.CONFIG.get('sendReferrer', False):
|
||||
return redirect(url)
|
||||
else:
|
||||
return HttpResponse('<script>document.location.href=%s;</script>'%json.dumps(url))
|
||||
|
|
Loading…
Reference in a new issue