summaryrefslogtreecommitdiff
path: root/django/template
AgeCommit message (Collapse)Author
2015-03-19Fixed typo in escape_filter() docstring.Jon Walsh
2015-03-16Fixed #24493 -- Added BaseContext.setdefault()Preston Timmons
2015-03-13Fed tuples to startswith when appropriateClaude Paroz
2015-03-09Fixed #24464 -- Made built-in HTML template filter functions escape their ↵Erik Romijn
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.
2015-03-07Fixed #24451 -- Deprecated comma-separated {% cycle %} syntax.Tim Graham
2015-03-03Fixed #24399 -- Made filesystem loaders use more specific exceptions.Preston Timmons
2015-03-02Fixed #24372 - Replaced TokenParser usage with traditional parsing.Preston Timmons
2015-03-02Used dict comprehension in URLNodeCorey Farwell
4468c08d7 replaced a lot of the old `dict()` comprehensions with the new style, but missed this one.
2015-03-02Fixed #24409 -- Combined the app_directories and filesystem loader ↵Preston Timmons
implementation. Besides the directories they look in, these two loaders are functionally the same. This removes unnecessary code duplication between the two.
2015-02-20Removed a non-obvious side-effect of assigning Context.template.Aymeric Augustin
Explicit is better than implicit.
2015-02-19Set context.template instead of context.engine while rendering.Aymeric Augustin
This opens more possibilities, like accessing context.template.origin. It also follows the chain of objects instead of following a shortcut.
2015-02-18Refs #24324 -- Fixed crash in {% debug %} tag on Python 2.Tim Graham
If Django is installed in a path that contains non-ASCII characters, the tag failed with UnicodeDecodeError.
2015-02-17Refs #24324 -- Fixed get_app_template_dirs() UnicodeDecodeError on Python 2.Tim Graham
The function implemented most of upath(), but skipped the check for strings that are already unicode.
2015-02-16Removed unnecessary __init__ definition from DebugLexer.Preston Timmons
2015-02-15Deprecated TEMPLATE_DEBUG setting.Aymeric Augustin
2015-02-14Fixed #24338 -- Accepted Template wrapper in {% extends %}.Aymeric Augustin
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.
2015-02-10Split DTL context creation into its own function.Aymeric Augustin
This reduces the length of rope RequestContext gives users to hang themselves with. Thanks Alex Hill for the report and Tim Graham for the review.
2015-02-08Simplified the lazy CSRF token implementation in csrf context processor.Alex Gaynor
This significantly improves performance on PyPy. The previous implementation would generate a new class on every single request, which is relatively slow.
2015-02-06Fixed E265 comment styleCollin Anderson
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-02-05Fixed #24273 -- Allowed copying RequestContext more than once.Aymeric Augustin
Thanks Collin Anderson for the report.
2015-02-04Fixed #24235 -- Removed is_usable attribute from template loaders.Preston Timmons
2015-02-03Fixed #18651 -- Enabled optional assignments for simple_tag().Preston Timmons
2015-02-03Fixed #24168 -- Allowed selecting a template engine in a few APIs.Aymeric Augustin
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.
2015-01-17Fixed typo in 'Django Template Language'David Robles
2015-01-12Accounted for multiple template engines in template responses.Aymeric Augustin
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-11Fixed #23913 -- Deprecated the `=` comparison in `if` template tag.Ola Sitarska
2015-01-07Added a request argument to render_to_string.Aymeric Augustin
This is for consistency with Template.render. It adds a little bit of knowledge about HTTP requests in django.template.loader but I think consistency trumps purity.
2015-01-07Exposed Engine in the django.template namespace.Aymeric Augustin
It's the main entrypoint to the refactored template system.
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-06Added comments to remove Engine.render_to_string in Django 2.0.Aymeric Augustin
Since this is a private API introduced in Django 1.8, no documentation is required.
2015-01-05Fixed #24022 -- Deprecated the ssi tag.Preston Timmons
2014-12-28Explained the structure of django.template.Aymeric Augustin
2014-12-28Raised a warning when using the legacy TEMPLATE_* settings.Aymeric Augustin
All tests now rely on TEMPLATES.
2014-12-28Deprecated TEMPLATE_CONTEXT_PROCESSORS.Aymeric Augustin
2014-12-28Raised an error when allowed_include_roots is a string.Aymeric Augustin
This avoids leaving projects silently vulnerable when this option is set to a string instead of a one-item tuple containing that string, a very common misconfiguration.
2014-12-28Deprecated current_app in TemplateResponse and render(_to_response).Aymeric Augustin
2014-12-28Preserved context class in inclusion_tag.Aymeric Augustin
Previously, when a template was rendered with RequestContext, inclusion tags were rendered with a plain context, losing additional information available in the RequestContext. The (admittedly bizarre) implementation of RequestContext.new() has the side-effect of not running template context processors, making this change backwards-compatible.
2014-12-28Simplified implementation of django.shortcuts.render(_to_response).Aymeric Augustin
*args, **kwargs brought more confusion than concision.
2014-12-28Moved context_processors from django.core to django.template.Aymeric Augustin
2014-12-28Added a comment about the last use of Engine.get_default().Aymeric Augustin
2014-12-28Supported multiple template engines in render_to_string.Aymeric Augustin
Adjusted its API through a deprecation path according to the DEP.
2014-12-28Removed extraneous arguments in Engine.from_string.Aymeric Augustin
This aligns the Django Template Engine API with the common template backend API.
2014-12-28Removed private API get_template_from_string.Aymeric Augustin
It wasn't documented and it wasn't used anywhere.
2014-12-28Removed private API find_template.Aymeric Augustin
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.
2014-12-28Supported multiple template engines in get_template and select_template.Aymeric Augustin
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).
2014-12-28Looked up the default template engine in the list of all engines.Aymeric Augustin