Ticket #15721: 15721.diff

File 15721.diff, 1.7 KB (added by Matthias Kestenholz, 13 years ago)
  • django/template/context.py

    diff --git a/django/template/context.py b/django/template/context.py
    index bcfaa3b..91e0ae7 100644
    a b class Context(BaseContext):  
    104104        Returns a new Context with the same 'autoescape' value etc, but with
    105105        only the values given in 'values' stored.
    106106        """
    107         return self.__class__(dict_=values, autoescape=self.autoescape,
     107        return Context(dict_=values, autoescape=self.autoescape,
    108108                              current_app=self.current_app, use_l10n=self.use_l10n)
    109109
    110110class RenderContext(BaseContext):
    class RequestContext(Context):  
    167167    Additional processors can be specified as a list of callables
    168168    using the "processors" keyword argument.
    169169    """
    170     def __init__(self, request, dict=None, processors=None, current_app=None, use_l10n=None):
    171         Context.__init__(self, dict, current_app=current_app, use_l10n=use_l10n)
     170    def __init__(self, request, dict=None, processors=None, autoescape=True,
     171                 current_app=None, use_l10n=None):
     172        Context.__init__(self, dict, autoescape=autoescape, current_app=current_app, use_l10n=use_l10n)
    172173        if processors is None:
    173174            processors = ()
    174175        else:
  • tests/regressiontests/templates/templates/response.html

    diff --git a/tests/regressiontests/templates/templates/response.html b/tests/regressiontests/templates/templates/response.html
    index 7535fa7..6706328 100644
    a b  
    11{% load url from future %}This is where you can find the snark: {% url "snark" %}
    2 {% now "U.u" %}
    3  No newline at end of file
     2{% now "U.u" %}
     3{% include "inclusion.html" with result="whatever" only %}
Back to Top