replace never_cache with no-cache
This commit is contained in:
parent
7a2ecb60ed
commit
7ae53e262d
1 changed files with 6 additions and 3 deletions
|
@ -2,7 +2,6 @@ from functools import wraps
|
|||
|
||||
from django.http import HttpResponseNotModified, HttpResponseRedirect
|
||||
from django.shortcuts import render
|
||||
from django.views.decorators.cache import never_cache
|
||||
|
||||
from c3nav.editor.models import ChangeSet
|
||||
from c3nav.mapdata.models.access import AccessPermission
|
||||
|
@ -27,11 +26,15 @@ def sidebar_view(func=None, select_related=None):
|
|||
return render(request, 'editor/redirect.html', {'target': response['location']})
|
||||
if not isinstance(response, HttpResponseNotModified):
|
||||
response.write(render(request, 'editor/fragment_nav.html', {}).content)
|
||||
response['Cache-Control'] = 'no-cache'
|
||||
return response
|
||||
if isinstance(response, HttpResponseRedirect):
|
||||
return response
|
||||
return render(request, 'editor/map.html', {'content': response.content})
|
||||
return never_cache(with_ajax_check)
|
||||
response = render(request, 'editor/map.html', {'content': response.content})
|
||||
response['Cache-Control'] = 'no-cache'
|
||||
return response
|
||||
|
||||
return with_ajax_check
|
||||
|
||||
|
||||
def etag_func(request, *args, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue