merging changes

This commit is contained in:
rolux 2011-10-09 10:05:06 +00:00
commit f23a480208

View file

@ -3,6 +3,7 @@
from django.shortcuts import render_to_response, redirect from django.shortcuts import render_to_response, redirect
from django.template import RequestContext from django.template import RequestContext
from django.conf import settings from django.conf import settings
from django.http import HttpResponse
from ox.django.shortcuts import json_response, render_to_json_response from ox.django.shortcuts import json_response, render_to_json_response
from ox.django.decorators import login_required_json from ox.django.decorators import login_required_json
@ -85,4 +86,8 @@ actions.register(editPage)
def redirect_url(request, url): def redirect_url(request, url):
if request.META['QUERY_STRING']: if request.META['QUERY_STRING']:
url += "?" + request.META['QUERY_STRING'] url += "?" + request.META['QUERY_STRING']
return redirect(url, permanent=True)
if settings.CONFIG.get('sendReferrer', False):
return redirect(url)
else:
return HttpResponse('<script>document.location.href=%s;</script>'%json.dumps(url))