summaryrefslogtreecommitdiff
path: root/tests/template_backends
AgeCommit message (Collapse)Author
2018-11-27Made reused RequestFactory instances class attributes.Simon Charette
2018-01-21Fixed #29038 -- Removed closing slash from HTML void tags.Jon Dufresne
2017-02-03Fixed spelling of "nonexistent".Tim Graham
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-20Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.Tim Graham
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-28Fixed #27258 -- Prohibited django.Template.render() with non-dict context.Shivang Bharadwaj
Thanks Shivang Bharadwaj for the initial patch.
2016-12-15Used assertRaisesMessage() in template_backends tests.Tim Graham
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-03Fixed #25788 -- Enabled the cached template loader if debug is False.Tim Graham
2016-06-28Fixed #24694 -- Added support for context_processors to Jinja2 backend.Berker Peksag
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-05-19Fixed #20869 -- made CSRF tokens change every request by salt-encrypting themShai Berger
Note that the cookie is not changed every request, just the token retrieved by the `get_token()` method (used also by the `{% csrf_token %}` tag). While at it, made token validation strict: Where, before, any length was accepted and non-ASCII chars were ignored, we now treat anything other than `[A-Za-z0-9]{64}` as invalid (except for 32-char tokens, which, for backwards-compatibility, are accepted and replaced by 64-char ones). Thanks Trac user patrys for reporting, github user adambrenecki for initial patch, Tim Graham for help, and Curtis Maloney, Collin Anderson, Florian Apolloner, Markus Holtermann & Jon Dufresne for reviews.
2015-11-12Fixed #25469 -- Added autoescape option to DjangoTemplates backend.Aaron Elliot Ross
Thanks Aymeric for the initial patch and Carl for review.
2015-09-23Removed support for passing a context to a generic Template.render().Tim Graham
Per deprecation timeline; refs a3e783fe11dd25bbf84bfb6201186566ed473506.
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-05-21Fixed #17085, #24783 -- Refactored template library registration.Preston Timmons
* Converted the ``libraries`` and ``builtins`` globals of ``django.template.base`` into properties of the Engine class. * Added a public API for explicit registration of libraries and builtins.
2015-05-20Refs #24652 -- Made sure template backend tests call their super setUpClass.Simon Charette
2015-05-06Fixed #24119, #24120 -- Formalized debug integration for template backends.Preston Timmons
2015-05-03Fixed #24685 -- Fixed check for template name unicity.Aymeric Augustin
Thanks Preston Timmons for the report.
2015-04-01Refs #24538 -- Simplified a test per Aymeric's feedback.Tim Graham
2015-04-01Fixed #24538 -- Allowed self in Jinja contextTim Heap
Rendering a Jinja template with self in the context threw an error. While self is a reserved variable in Jinja, including self in the context is not an error, so Django should respect that.
2015-03-18Refs #24469 -- Fixed escaping of forms, fields, and media in non-Django ↵Moritz Sichert
templates.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-05Fixed #24265 -- Preserved template backend loading exceptions.Aymeric Augustin
If importing or initializing a template backend fails, attempting to access this template backend again must raise the same exception.
2015-01-17Removed compatibility with Python 3.2.Tim Graham
2015-01-12Deprecated passing a Context to a generic Template.render.Aymeric Augustin
A deprecation path is required because the return type of django.template.loader.get_template changed during the multiple template engines refactor. test_csrf_token_in_404 was incorrect: it tested the case when the hardcoded template was rendered, and that template doesn't depend on the CSRF token. This commit makes it test the case when a custom template is rendered.
2015-01-12Rewrapped TemplateSyntaxError in Jinja2 backend.Aymeric Augustin
Changed import style to avoid confusion between Django's and Jinja2's APIs.
2015-01-06Made context take priority over context processors.Aymeric Augustin
This is the expected behavior, but given RequestContext's tortuous implementation, a straightforward use of its API results in the opposite. This commits fixes a regression that must have happened at different points in the multiple templates engine refactor for different features.
2015-01-01Silenced an ImportWarning in the template_backends tests.Tim Graham
2014-12-28Added basic tests for template backends.Aymeric Augustin