don't remove if-none-match header on editor ajax
This commit is contained in:
parent
7ae53e262d
commit
6e9d2424f8
1 changed files with 4 additions and 2 deletions
|
@ -17,11 +17,13 @@ def sidebar_view(func=None, select_related=None):
|
|||
def with_ajax_check(request, *args, **kwargs):
|
||||
request.changeset = ChangeSet.get_for_request(request, select_related)
|
||||
|
||||
if request.is_ajax() or 'ajax' in request.GET:
|
||||
ajax = request.is_ajax() or 'ajax' in request.GET
|
||||
|
||||
if not ajax:
|
||||
request.META.pop('HTTP_IF_NONE_MATCH', None)
|
||||
|
||||
response = func(request, *args, **kwargs)
|
||||
if request.is_ajax() or 'ajax' in request.GET:
|
||||
if ajax:
|
||||
if isinstance(response, HttpResponseRedirect):
|
||||
return render(request, 'editor/redirect.html', {'target': response['location']})
|
||||
if not isinstance(response, HttpResponseNotModified):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue