summaryrefslogtreecommitdiff
path: root/django/template/loaders
AgeCommit message (Collapse)Author
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-11-21Refs #15053 -- Clarified debug message when skipping templates to avoid ↵Daniel Hahler
recursion.
2020-11-05Refs #25791 -- Added get_dirs() method to cached template loader.Tom Forbes
2019-01-18Removed template_cache attribute from cached template loader.Tom Forbes
Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
2019-01-18Fixed #30107 -- Removed unused dirs variable from cache template loader keys.Tim Graham
Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
2018-02-10Refs #27795 -- Removed force_bytes() usage in django/template/loaders/cached.py.Jon Dufresne
2017-05-27Replaced some map() and filter() calls with generators.Tom
2017-02-23Refs #23919 -- Used yield from.Vytis Banaitis
2017-02-17Refs #27656 -- Updated django.template/tag docstring verbs according to PEP 257.Anton Samarchyan
2017-02-07Refs #27795 -- Removed force_text from the template layerClaude Paroz
Thanks Tim Graham for the review.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-25Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.Tim Graham
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Replaced io.open() with open().Aymeric Augustin
io.open() is an alias for open() on Python 3.
2017-01-17Refs #25120 -- Removed template.loaders.eggs.Loader per deprecation timeline.Tim Graham
2017-01-17Refs #15053 -- Removed support for non-recursive template loading.Tim Graham
Per deprecation timeline.
2016-12-14Fixed #27598 -- Allowed specifying directories for a filesystem template loader.Tim Graham
Thanks Carl Meyer for review.
2016-05-10Fixed #26603 -- Forced lazy template names to text when computing cache key.Simon Charette
Refs #26536. Thanks Sylvain Fankhauser for the very detailed report.
2016-04-24Fixed #26536 -- Preserved leading dashes of the cached template loader keys.Simon Charette
Thanks Anders Roos for the report.
2016-03-16Fixed #26306 -- Fixed memory leak in cached template loader.Alex Hill
2016-02-26Fixed #26280 -- Fixed cached template loader crash when loading nonexistent ↵Ivan Tsouvarev
template.
2015-11-17Fixed #25682 -- Removed bare except clauses.Attila Tovt
2015-09-23Removed template.loader.BaseLoader per deprecation timeline.Tim Graham
2015-09-05Refs #24235 -- Removed unused is_usable attribute from base template Loader.Tim Graham
2015-07-16Fixed #25120 -- Deprecated egg template loader.Tim Graham
2015-06-29Removed unnecessary returnAndriy Sokolovskiy
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-15Fixed #24979 -- Removed usage of inspect.getargspec().Tim Graham
2015-05-06Moved engine-related exceptions to django.template.exceptions.Preston Timmons
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.
2015-04-22Fixed #15053 -- Enabled recursive template loading.Preston Timmons
2015-03-03Fixed #24399 -- Made filesystem loaders use more specific exceptions.Preston Timmons
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-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-04Fixed #24235 -- Removed is_usable attribute from template loaders.Preston Timmons
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 some uses of global APIs from django.template.loader.Aymeric Augustin
2014-11-23Moved make_origin into the Engine class.Aymeric Augustin
2014-11-23Removed dependency of template loaders on Django settings.Aymeric Augustin
2014-11-23Moved template loaders management in Engine.Aymeric Augustin
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.
2014-11-23Removed unused API get_template_loaders.Aymeric Augustin
It was introduced in a recent refactoring so this isn't an issue. Then renamed _get_template_loaders to get_template_loaders.
2014-11-16Removed support for function-based template loaders.Aymeric Augustin
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.
2014-11-16Used get_template_loaders in the cached loader.Aymeric Augustin
This ensures that enabling the cached loader doesn't change behavior. (Before this commit, it did when the list contained unusable loaders.)
2014-11-16Refactored getting the list of template loaders.Aymeric Augustin
This provides the opportunity to move utility functions specific to the Django Template Language outside of django.template.loader.
2014-11-16Refactored listing template subdirectories in apps.Aymeric Augustin
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.
2014-11-16Removed skip_template argument of locmem.Loader.load_template_source.Aymeric Augustin
It didn't do anything, wasn't documented and wasn't used anywhere.
2014-11-16Removed the "test:" prefix from locmem template identifiers.Aymeric Augustin
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.
2014-11-16Moved all template loaders under django.template.loaders.Aymeric Augustin
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.
2014-11-11Normalized opening a file and decoding its content.Aymeric Augustin
`io.open` is required on Python 2.7. Just `open` would work on Python 3.
2014-11-11Raised SuspiciousFileOperation in safe_join.Aymeric Augustin
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.
2013-12-27Don't try to load app directory templates from apps with a path (eg eggs)Florian Apolloner