summaryrefslogtreecommitdiff
path: root/django/template/loaders
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-075-15/+17
|
* Refs #15053 -- Clarified debug message when skipping templates to avoid ↵Daniel Hahler2020-11-211-1/+1
| | | | recursion.
* Refs #25791 -- Added get_dirs() method to cached template loader.Tom Forbes2020-11-051-0/+5
|
* Removed template_cache attribute from cached template loader.Tom Forbes2019-01-181-2/+0
| | | Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
* Fixed #30107 -- Removed unused dirs variable from cache template loader keys.Tim Graham2019-01-181-3/+2
| | | Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
* Refs #27795 -- Removed force_bytes() usage in django/template/loaders/cached.py.Jon Dufresne2018-02-101-2/+1
|
* Replaced some map() and filter() calls with generators.Tom2017-05-271-1/+1
|
* Refs #23919 -- Used yield from.Vytis Banaitis2017-02-231-2/+1
|
* Refs #27656 -- Updated django.template/tag docstring verbs according to PEP 257.Anton Samarchyan2017-02-171-5/+5
|
* Refs #27795 -- Removed force_text from the template layerClaude Paroz2017-02-071-2/+2
| | | | Thanks Tim Graham for the review.
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-253-4/+4
|
* Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.Tim Graham2017-01-251-6/+2
|
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-1/+1
|
* Refs #23919 -- Replaced io.open() with open().Aymeric Augustin2017-01-181-2/+1
| | | | io.open() is an alias for open() on Python 3.
* Refs #25120 -- Removed template.loaders.eggs.Loader per deprecation timeline.Tim Graham2017-01-171-56/+0
|
* Refs #15053 -- Removed support for non-recursive template loading.Tim Graham2017-01-175-193/+12
| | | | Per deprecation timeline.
* Fixed #27598 -- Allowed specifying directories for a filesystem template loader.Tim Graham2016-12-141-1/+5
| | | | Thanks Carl Meyer for review.
* Fixed #26603 -- Forced lazy template names to text when computing cache key.Simon Charette2016-05-101-2/+2
| | | | | | Refs #26536. Thanks Sylvain Fankhauser for the very detailed report.
* Fixed #26536 -- Preserved leading dashes of the cached template loader keys.Simon Charette2016-04-241-1/+1
| | | | Thanks Anders Roos for the report.
* Fixed #26306 -- Fixed memory leak in cached template loader.Alex Hill2016-03-161-3/+24
|
* Fixed #26280 -- Fixed cached template loader crash when loading nonexistent ↵Ivan Tsouvarev2016-02-261-1/+1
| | | | template.
* Fixed #25682 -- Removed bare except clauses.Attila Tovt2015-11-171-1/+1
|
* Removed template.loader.BaseLoader per deprecation timeline.Tim Graham2015-09-231-2/+0
|
* Refs #24235 -- Removed unused is_usable attribute from base template Loader.Tim Graham2015-09-051-1/+0
|
* Fixed #25120 -- Deprecated egg template loader.Tim Graham2015-07-161-0/+2
|
* Removed unnecessary returnAndriy Sokolovskiy2015-06-291-1/+1
|
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-245-20/+21
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Fixed #24979 -- Removed usage of inspect.getargspec().Tim Graham2015-06-152-4/+4
|
* Moved engine-related exceptions to django.template.exceptions.Preston Timmons2015-05-065-5/+5
| | | | | | 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-225-42/+253
|
* Fixed #24399 -- Made filesystem loaders use more specific exceptions.Preston Timmons2015-03-031-2/+4
|
* Fixed #24409 -- Combined the app_directories and filesystem loader ↵Preston Timmons2015-03-022-40/+10
| | | | | | | implementation. Besides the directories they look in, these two loaders are functionally the same. This removes unnecessary code duplication between the two.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-5/+6
|
* Fixed #24235 -- Removed is_usable attribute from template loaders.Preston Timmons2015-02-046-17/+14
|
* Removed extraneous arguments in Engine.from_string.Aymeric Augustin2014-12-282-4/+4
| | | | | This aligns the Django Template Engine API with the common template backend API.
* Removed some uses of global APIs from django.template.loader.Aymeric Augustin2014-12-282-4/+2
|
* Moved make_origin into the Engine class.Aymeric Augustin2014-11-232-4/+5
|
* Removed dependency of template loaders on Django settings.Aymeric Augustin2014-11-233-8/+6
|
* Moved template loaders management in Engine.Aymeric Augustin2014-11-234-47/+9
| | | | | | | | | | | 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-232-12/+4
| | | | | | It was introduced in a recent refactoring so this isn't an issue. Then renamed _get_template_loaders to get_template_loaders.
* Removed support for function-based template loaders.Aymeric Augustin2014-11-161-21/+6
| | | | | | | | 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.
* Used get_template_loaders in the cached loader.Aymeric Augustin2014-11-162-17/+10
| | | | | | This ensures that enabling the cached loader doesn't change behavior. (Before this commit, it did when the list contained unusable loaders.)
* Refactored getting the list of template loaders.Aymeric Augustin2014-11-162-1/+59
| | | | | This provides the opportunity to move utility functions specific to the Django Template Language outside of django.template.loader.
* Refactored listing template subdirectories in apps.Aymeric Augustin2014-11-161-24/+2
| | | | | | 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.
* Removed skip_template argument of locmem.Loader.load_template_source.Aymeric Augustin2014-11-161-2/+1
| | | | It didn't do anything, wasn't documented and wasn't used anywhere.
* Removed the "test:" prefix from locmem template identifiers.Aymeric Augustin2014-11-161-2/+1
| | | | | | | 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.
* Moved all template loaders under django.template.loaders.Aymeric Augustin2014-11-166-4/+78
| | | | | | | | | | | | 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.
* Normalized opening a file and decoding its content.Aymeric Augustin2014-11-112-4/+7
| | | | `io.open` is required on Python 2.7. Just `open` would work on Python 3.
* Raised SuspiciousFileOperation in safe_join.Aymeric Augustin2014-11-112-12/+8
| | | | | | | | | | | | | | | 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.
* Don't try to load app directory templates from apps with a path (eg eggs)Florian Apolloner2013-12-271-0/+2
|