Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/template/engine.py
Commit message (Collapse)AuthorAgeFilesLines
* Added django.template.engine.Engine.render_to_string() ↵Tim Graham2015-09-241-6/+4
| | | | docstring.
* Removed template.loader.BaseLoader per deprecation timeline.Tim Graham2015-09-241-13/+1
|
* Removed dictionary and context_instance parameters for ↵Tim Graham2015-09-241-33/+7
| | | | | | render functions. Per deprecation timeline.
* Removed dirs parameter in template engine methods and ↵Tim Graham2015-09-241-32/+6
| | | | | | related funtions. Per deprecation timeline.
* Refs #24022 -- Removed the ssi tag per deprecation timeline.Tim Graham2015-09-241-9/+1
|
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-241-9/+9
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Fixed #17085, #24783 -- Refactored template library ↵Preston Timmons2015-05-211-1/+24
| | | | | | | | registration. * 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.
* Moved engine-related exceptions to ↵Preston Timmons2015-05-071-1/+2
| | | | | | | | django.template.exceptions. With the introduction of multiple template engines these exceptions are no longer DTL-specific. It makes more sense for them to be moved out of DTL-related modules.
* Fixed #15053 -- Enabled recursive template loading.Preston Timmons2015-04-221-16/+18
|
* Cleaned up the template debug implementation.Preston Timmons2015-03-201-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch does three major things: * Merges the django.template.debug implementation into django.template.base. * Simplifies the debug implementation. The old implementation copied debug information to every token and node. The django_template_source attribute was set in multiple places, some quite hacky, like django.template.defaulttags.ForNode. Debug information is now annotated in two high-level places: * Template.compile_nodelist for errors during parsing * Node.render_annotated for errors during rendering These were chosen because they have access to the template and context as well as to all exceptions that happen during either the parse or render phase. * Moves the contextual line traceback information creation from django.views.debug into django.template.base.Template. The debug views now only deal with the presentation of the debug information.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-3/+1
|
* Fixed #24235 -- Removed is_usable attribute from ↵Preston Timmons2015-02-041-12/+1
| | | | template loaders.
* Exposed Engine in the django.template namespace.Aymeric Augustin2015-01-071-3/+4
| | | | It's the main entrypoint to the refactored template system.
* Added comments to remove Engine.render_to_string in ↵Aymeric Augustin2015-01-061-6/+6
| | | | | | | Django 2.0. Since this is a private API introduced in Django 1.8, no documentation is required.
* Raised an error when allowed_include_roots is a string.Aymeric Augustin2014-12-281-1/+5
| | | | | | 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.
* Supported multiple template engines in render_to_string.Aymeric Augustin2014-12-281-10/+27
| | | | Adjusted its API through a deprecation path according to the DEP.
* Removed extraneous arguments in Engine.from_string.Aymeric Augustin2014-12-281-3/+3
| | | | | This aligns the Django Template Engine API with the common template backend API.
* Looked up the default template engine in the list of all ↵Aymeric Augustin2014-12-281-13/+32
| | | | engines.
* Passed a reference to the current engine when ↵Aymeric Augustin2014-12-281-1/+1
| | | | instantiating Template.
* Renamed get_template_from_string to from_string.Aymeric Augustin2014-12-281-8/+8
| | | | The shorter name is just as explicit and, well, shorter.
* Simplified handling of a default value.Aymeric Augustin2014-12-281-3/+1
|
* Encapsulated TEMPLATE_DEBUG in Engine.Aymeric Augustin2014-11-231-3/+5
|
* Encapsulated TEMPLATE_CONTEXT_PROCESSORS in Engine.Aymeric Augustin2014-11-231-0/+7
| | | | | | Since RequestContext doesn't know its Engine until it's passed to Template.render() -- and cannot without breaking a widely used public API -- an elaborate hack is required to apply context processors.
* Moved make_origin into the Engine class.Aymeric Augustin2014-11-231-3/+10
|
* Move compile_string into the Engine class.Aymeric Augustin2014-11-231-1/+15
|
* Removed dependency of template loaders on Django settings.Aymeric Augustin2014-11-231-1/+6
|
* Moved template loaders management in Engine.Aymeric Augustin2014-11-231-3/+46
| | | | | | | | | | | Passed the engine instance to loaders. This is a prerequisite for looking up configuration on the engine instance instead of global settings. This is backwards incompatible for custom template loaders that override __init__. However the documentation doesn't talk about __init__ and the way to pass arguments to custom template loaders isn't specified. I'm considering it a private API.
* Removed unused API get_template_loaders.Aymeric Augustin2014-11-231-2/+2
| | | | | | It was introduced in a recent refactoring so this isn't an issue. Then renamed _get_template_loaders to get_template_loaders.
* Introduced a template engine class.Aymeric Augustin2014-11-231-0/+154
Moved Django templates loading infrastructure there.