Commit Graph

13 Commits

Author SHA1 Message Date
Tim Graham ae1d663b79 [1.8.x] Renamed RemovedInDjango20Warning to RemovedInDjango110Warning. 2015-06-23 07:22:16 -04:00
Simon Charette 2b2a2157d0 [1.8.x] Refs #24652 -- Made sure template backend tests call their super setUpClass.
Backport of ead36e8a47 from master
2015-05-20 13:32:36 -04:00
Aymeric Augustin 1f0a6082ec [1.8.x] Fixed #24685 -- Fixed check for template name unicity.
Thanks Preston Timmons for the report.

Backport of 1563b89 from master
2015-05-04 07:39:28 +02:00
Tim Graham 5a4f95805f [1.8.x] Refs #24538 -- Simplified a test per Aymeric's feedback.
Backport of a184a99123 from master
2015-04-01 13:19:57 -04:00
Tim Heap ff8eabc5cc [1.8.x] Fixed #24538 -- Allowed self in Jinja context
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.

Backport of 4ea1909d3c from master
2015-04-01 12:27:52 -04:00
Moritz Sichert 571e093a25 [1.8.x] Refs #24469 -- Fixed escaping of forms, fields, and media in non-Django templates.
Backport of 6bff343989 from master
2015-03-18 09:11:44 -04:00
Tim Graham a8b70d251d [1.8.x] Sorted imports with isort; refs #23860.
Backport of 0ed7d15563 from master
2015-02-09 14:24:06 -05:00
Aymeric Augustin aed1b1f6e5 [1.8.x] Fixed #24265 -- Preserved template backend loading exceptions.
If importing or initializing a template backend fails, attempting to
access this template backend again must raise the same exception.

Backport of 44ad6915 from master
2015-02-05 20:09:22 +01:00
Aymeric Augustin a3e783fe11 Deprecated passing a Context to a generic Template.render.
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-12 21:01:34 +01:00
Aymeric Augustin 71b7668b75 Rewrapped TemplateSyntaxError in Jinja2 backend.
Changed import style to avoid confusion between Django's and Jinja2's
APIs.
2015-01-12 21:01:34 +01:00
Aymeric Augustin 0cdb09d489 Made context take priority over context processors.
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-06 22:02:27 +01:00
Tim Graham 40ccef16cb Silenced an ImportWarning in the template_backends tests. 2015-01-01 14:28:53 -05:00
Aymeric Augustin 332154e726 Added basic tests for template backends. 2014-12-28 16:23:00 +01:00