improve debugging be giving ajax output on ?ajax query string
This commit is contained in:
parent
85da33dee6
commit
866f68381f
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ def sidebar_view(func):
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
def with_ajax_check(request, *args, **kwargs):
|
def with_ajax_check(request, *args, **kwargs):
|
||||||
response = func(request, *args, **kwargs)
|
response = func(request, *args, **kwargs)
|
||||||
if request.is_ajax():
|
if request.is_ajax() or 'ajax' in request.GET:
|
||||||
if isinstance(response, HttpResponseRedirect):
|
if isinstance(response, HttpResponseRedirect):
|
||||||
return render(request, 'editor/redirect.html', {'target': response['location']})
|
return render(request, 'editor/redirect.html', {'target': response['location']})
|
||||||
return response
|
return response
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue