| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
for LoaderOrigin and StringOrigin.
Thanks Simon Charette for the DeprecationInstanceCheck class.
|
| |
|
|
|
|
|
|
| |
render functions.
Per deprecation timeline.
|
|
|
|
|
|
| |
related funtions.
Per deprecation timeline.
|
| |
|
|
|
|
|
| |
Forwardport of ae1d663b7913f6da233c55409c4973248372d302
from stable/1.8.x plus more.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
template backends.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Django 2.0.
Since this is a private API introduced in Django 1.8, no documentation
is required.
|
|
|
|
| |
Adjusted its API through a deprecation path according to the DEP.
|
|
|
|
| |
It wasn't documented and it wasn't used anywhere.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
select_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).
|
|
|
|
| |
The shorter name is just as explicit and, well, shorter.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Moved Django templates loading infrastructure there.
|
|
|
|
| |
Cancels 2f0566fa. Refs #4278.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change preserves backwards-compatibility for a very common misuse
of render_to_response which even occurred in the official documentation.
It fixes that misuse wherever it happened in the code base and docs.
Context.__init__ is documented as accepting a dict and nothing else.
Since Context is dict-like, Context(Context({})) could work to some
extent. However, things get complicated with RequestContext and that
gets in the way of refactoring the template engine. This is the real
rationale for this change.
|
|
|
|
|
| |
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
|
| |
|
|
|
|
| |
It didn't account for class-based template loaders.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reformatted the code of base.Loader according to modern standards.
Turned the test template loader into a regular locmem.Loader -- but
didn't document it.
Added a normal deprecation path for BaseLoader which is a public API.
Added an accelerated deprecation path for TestTemplateLoader which is
a private API.
|
|
|
|
| |
refs #23395.
|
|
|
|
|
|
|
| |
empty dictionaries to its Context
Thanks to kezabelle for the report and original patch
and to numerodix for his improved patch.
|
|
|
|
|
|
| |
in favor of import_string().
Thanks Aymeric Augustin for the suggestion and review.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
to override TEMPLATE_DIRS.
* django.template.loader.get_template()
* django.template.loader.select_template()
* django.shortcuts.render()
* django.shortcuts.render_to_response()
Thanks amcnabb for the suggestion.
|
|
|
|
| |
Thanks joseph at vertstudios.com for the suggestion.
|
|
|
|
| |
Thanks Loic Bistuer for the review.
|
|
|
|
|
|
| |
dotted path
Thanks Carl Meyer for the report.
|
| |
|
|
|
|
|
| |
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
|
|
|
|
|
|
| |
passed to select_template. Thanks Silver_Ghost for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
| |
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
errors are propegated with a meaningful error message when loaded using select_template. Thanks to jaylett for the report, and GDorn for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
deprecation message. Thanks to msaelices for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
stack in the state it was originally passed in.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
out of __init__.py, to help with avoiding circular import dependencies. Thanks to Tom Tobin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
compatibility. Thanks to avostryakov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
not exist when a template being extended includes another template that does not exist. Thanks to trigeek38 for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
|
|
|
|
| |
that the template
file name is correctly reported on the debug page when a template syntax
error is raised.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
instances instead of old-style raising exception classes plus a comma. Good for the future Python 3 conversion
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
| |
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11923 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|