| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
base template Loader.
|
| |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
specific exceptions.
|
|
|
|
|
|
|
| |
filesystem loader implementation.
Besides the directories they look in, these two loaders are functionally
the same. This removes unnecessary code duplication between the two.
|
| |
|
|
|
|
| |
template loaders.
|
|
|
|
|
| |
This aligns the Django Template Engine API with the common template
backend API.
|
|
|
|
| |
django.template.loader.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
It was introduced in a recent refactoring so this isn't an issue.
Then renamed _get_template_loaders to get_template_loaders.
|
|
|
|
|
|
|
|
| |
They were deprecated in Django 1.2 but not all the supporting code was
removed in Django 1.4. Since the remaining code was unlikely to be
functional (pun intended) e.g. it would crash unless the loader
function had an is_usable attribute, this commit completes the removal
immediately instead of starting another deprecation path.
|
|
|
|
|
|
| |
This ensures that enabling the cached loader doesn't change behavior.
(Before this commit, it did when the list contained unusable loaders.)
|
|
|
|
|
| |
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
|
|
|
|
|
|
| |
This change has the nice side effect of removing code that ran at import
time and depended on the app registry at module level -- a notorious
cause of AppRegistryNotReady exceptions.
|
|
|
|
|
|
| |
locmem.Loader.load_template_source.
It didn't do anything, wasn't documented and wasn't used anywhere.
|
|
|
|
|
|
|
| |
Since it isn't branded as a test utility any more and could be used for
other purposes than test code, that prefix no longer makes sense.
It wasn't used anywhere either.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
`io.open` is required on Python 2.7. Just `open` would work on Python 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a test for the condition safe_join is designed to prevent.
Previously, a generic ValueError was raised. It was impossible to tell
an intentional exception raised to implement safe_join's contract from
an unintentional exception caused by incorrect inputs or unexpected
conditions. That resulted in bizarre exception catching patterns, which
this patch removes.
Since safe_join is a private API and since the change is unlikely to
create security issues for users who use it anyway -- at worst, an
uncaught SuspiciousFileOperation exception will bubble up -- it isn't
documented.
|
|
|
|
| |
a path (eg eggs)
|
| |
|
|
|
|
|
|
| |
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
|
|
|
|
| |
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
|
|
|
|
| |
Used the app cache's get_app_configs() method instead.
|
|
|
|
|
|
| |
find_template
Refs #20806. Thanks Unai Zalakain for the review.
|
| |
|
| |
|
|
|
|
| |
Thanks Susan Tan. Refs #19949.
|
|
|
|
|
|
|
| |
TemplateDoesNotExist
Thanks @timgraham and @jdunck for the code reviews and Kronuz for bug
report and initial patch.
|
|
|
|
|
| |
The cached template loader should cache find_template in addition to
load_template.
|
|
|
|
| |
This was a shim for pre-Python 2.7 support.
|
|
|
|
| |
Thanks Kronuz and regebro.
|
| |
|
|
|
|
|
|
|
|
| |
variables.
Thanks chrismedrela for the report.
Refs #6262, 44b9076 and 4d94c0c.
|
| |
|
|
|
|
| |
in the app directories template loader.
|
|
|
|
| |
Thanks Vinaj Sajip for the help of his django3 branch.
|
| |
|
|
|
|
|
| |
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
|
|
|
|
|
|
| |
fully loaded before it is cached. Thanks andrey DOT gtx AT gmail DOT com for the report and patch, and Anssi Kääriäinen for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
|
|
| |
Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|
|
|
|
| |
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
|