request._cache_update_cache = False
def _check_included_vars(response):
- used_vars = request.ssi_vars_needed
+ used_vars = getattr(request, 'ssi_vars_needed', {})
if get_ssi_vars:
# Remove the ssi vars that should be provided
# by the including view.
if (request.session.accessed and
(settings.USE_I18N or settings.USE_L10N)):
request.session.accessed = False
+ if not hasattr(request, 'ssi_patch_response'):
+ request.ssi_patch_response = []
request.ssi_patch_response.append(ssi_vary_on_cookie)
for var in pass_vars:
if not isinstance(var, SsiVariable):
var = SsiVariable(*var)
+ if not hasattr(request, 'ssi_vars_needed'):
+ request.ssi_vars_needed = {}
request.ssi_vars_needed[var.name] = var
# Remember the decorators to use on the including view.
patch_response = getattr(view, 'ssi_patch_response', None)
if patch_response:
+ if not hasattr(request, 'ssi_patch_response'):
+ request.ssi_patch_response = []
request.ssi_patch_response.extend(patch_response)
# Output the SSI include.
var = SsiVariable(self.tagpath, resolved_args, resolved_kwargs)
request = context['request']
+ if not hasattr(request, 'ssi_vars_needed'):
+ request.ssi_vars_needed = {}
request.ssi_vars_needed[var.name] = var
if self.patch_response:
+ if not hasattr(request, 'ssi_patch_response'):
+ request.ssi_patch_response = []
request.ssi_patch_response.extend(self.patch_response)
if self.asvar: