| Age | Commit message (Collapse) | Author |
|
Backport of 8bf1449edb4139451643e3823b194b4c02ca7633 from master
|
|
This change:
* Makes the InclusionNode cache-safe by removing render-time side effects
to its nodelist.
* Ensures the render_context stack is properly scoped and reset by updating
the render call to use Template.render rather than Nodelist.render.
Backport of 0808ccce3808235c5b5a56e3f689cec0d4bc0ebf from master
|
|
Now that the URL is always unescaped as of refs #22267,
we should re-escape it before inserting it into the anchor.
Backport of 7b1a67cce52e5c191fbfa1bca501c6f0222db019 from master
|
|
their input by default.
This may cause some backwards compatibility issues, but may also
resolve security issues in third party projects that fail to heed warnings
in our documentation.
Thanks Markus Holtermann for help with tests and docs.
Backport of fa350e2f303572ee8f9a8302dda45a12288d3d95 from master
|
|
Refs #22267.
Thanks Shai Berger for spotting the issue and Tim Graham for the
initial patch.
Backport of ec808e807 from master.
|
|
Backport of 8e129b42ad9c9adca599228ae2ad68271fa46d44 from master
|
|
Backport of 32c108a221c54a4f680afe32175d70b5d2e92593 from master
|
|
Backport of 25a0b5cdcd5e70a6563116639a477b915ee5784e from master
|
|
Backport of 3d8fee605184d8ffa47a32546298b52b52d7a087 from master
|
|
Backport of f6d087b628a61a7b036cc468328497082031dc8e from master
|
|
Backport of 250a3d199310a954a95fb1ffa4915f0e51ba1767 from master
|
|
Backport of ff67ce5076c1f4d3dc32fd755a1b65d3310c6cb1 from master
|
|
Backport of 06ffc764a9b2d2521e6a574d279b66ad411cc65c from master
|
|
Backport of 441a47e1efd46001ca454b80e0d5f8c5ea4e235b from master
|
|
Backport of 1827aa902481cd80d2fb154e7b073f139936d5fc from master
|
|
This opens more possibilities, like accessing context.template.origin.
It also follows the chain of objects instead of following a shortcut.
Backport of 1bfcc95 from master
|
|
source contains non-ASCII characters.
Backport of 307c0f299a6c26f5231d3516df5b4edc54b36553 from master
|
|
Backport of 15b711b from master.
|
|
Explicitly checking for django.template.Template subclasses is
preferrable to duck-typing because both the django.template.Template and
django.template.backends.django.Template have a render() method.
Thanks spectras for the report.
Backport of 47ee7b48 from master
|
|
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
|
|
Thanks Collin Anderson for the report.
Backport of 31d3a355 from master
|
|
Specifically in rendering shortcuts, template responses, and class-based
views that return template responses.
Also added a test for render_to_response(status=...) which was missing
from fdbfc980.
Thanks Tim and Carl for the review.
Backport of 2133f31 from master.
Conflicts:
docs/topics/http/shortcuts.txt
tests/generic_views/test_base.py
|
|
Backport of b84100e8e22b175b62ce849acbcf1fa9a1e0e5b8 from master
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adjusted its API through a deprecation path according to the DEP.
|
|
It wasn't documented and it wasn't used anywhere, except in a few tests
that don't test it specifically and can be rewritten with get_template.
|
|
This commit changes the return type of these two functions. Instead of
returning a django.template.Template they return a backend-specific
Template class that must implement render(self, context).
|
|
|
|
Since this package is going to hold both the implementation of the Django
Template Language and the infrastructure for Multiple Template Engines,
it should be untied from the DTL as much as possible within our
backwards-compatibility policy.
Only public APIs (i.e. APIs mentioned in the documentation) were left.
|
|
|
|
Running this file as a standalone script doesn't work anyway.
|
|
tests.
|
|
|
|
These test methods don't need DB setup/teardown.
Refs #23768 and b872134b.
|
|
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
|
|
Without this patch, you couldn't run an individual test
case in template_tests.
Refs #23768
|
|
|
|
Thanks to Tim for the review.
|