Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/template/loaders
Commit message (Collapse)AuthorAgeFilesLines
* Removed template.loader.BaseLoader per deprecation timeline.Tim Graham2015-09-241-2/+0
|
* Refs #24235 -- Removed unused is_usable attribute from ↵Tim Graham2015-09-051-1/+0
| | | | base template Loader.
* 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 ↵Preston Timmons2015-05-075-5/+5
| | | | | | | | 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-225-42/+253
|
* Fixed #24399 -- Made filesystem loaders use more ↵Preston Timmons2015-03-031-2/+4
| | | | specific exceptions.
* Fixed #24409 -- Combined the app_directories and ↵Preston Timmons2015-03-022-40/+10
| | | | | | | filesystem loader 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 ↵Preston Timmons2015-02-046-17/+14
| | | | template loaders.
* 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 ↵Aymeric Augustin2014-12-282-4/+2
| | | | django.template.loader.
* 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 ↵Aymeric Augustin2014-11-161-2/+1
| | | | | | locmem.Loader.load_template_source. 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 ↵Florian Apolloner2013-12-271-0/+2
| | | | a path (eg eggs)
* Properly app_template_dirs when INSTALLED_APPS change.Florian Apolloner2013-12-271-12/+15
|
* Renamed AppCache to Apps.Aymeric Augustin2013-12-242-4/+4
| | | | | | Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-222-2/+2
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Stopped iterating on INSTALLED_APPS.Aymeric Augustin2013-12-222-11/+7
| | | | Used the app cache's get_app_configs() method instead.
* Fixed #21460 -- Reenabled proper template precedence in ↵Pablo Martín2013-11-221-0/+1
| | | | | | find_template Refs #20806. Thanks Unai Zalakain for the review.
* Fixed the remaining E302 violations int eh django packageAlex Gaynor2013-11-034-0/+4
|
* Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin2013-09-022-3/+3
|
* Added further fixes, tests for #19949/f33db5a09a.Ramiro Morales2013-08-261-1/+5
| | | | Thanks Susan Tan. Refs #19949.
* Fixed 19949 -- Cached template loader now caches ↵SusanTan2013-08-241-6/+8
| | | | | | | TemplateDoesNotExist Thanks @timgraham and @jdunck for the code reviews and Kronuz for bug report and initial patch.
* Fixed #20806 -- Cached loader caches find_templateGavin Wahl2013-07-301-12/+27
| | | | | The cached template loader should cache find_template in addition to load_template.
* Deprecated django.utils.importlibClaude Paroz2013-07-291-1/+1
| | | | This was a shim for pre-Python 2.7 support.
* Fixed #19510 -- Race condition in template loading.Aymeric Augustin2013-03-171-2/+4
| | | | Thanks Kronuz and regebro.
* [py3] Always fed hashlib with bytes.Łukasz Langa2013-02-271-1/+2
|
* Fixed #19729 -- Removed leftover refactoring helper ↵Ramiro Morales2013-02-053-6/+0
| | | | | | | | variables. Thanks chrismedrela for the report. Refs #6262, 44b9076 and 4d94c0c.
* [py3] Fixed egg template loader.Aymeric Augustin2012-08-141-4/+9
|
* [py3] Fixed filesystem encoding handlingAymeric Augustin2012-08-081-2/+6
| | | | in the app directories template loader.
* Specified when open should use binary mode.Claude Paroz2012-05-252-2/+2
| | | | Thanks Vinaj Sajip for the help of his django3 branch.
* Made more extensive usage of context managers with open.Claude Paroz2012-05-052-10/+4
|
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
* Fixed #17303 -- Ensured the list of template loaders is ↵Aymeric Augustin2011-12-301-1/+5
| | | | | | 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
* Fixed #16225 -- Removed unused imports. Many thanks to ↵Jannis Leidel2011-07-131-2/+0
| | | | | | 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
* Advanced deprecations in django.template.Russell Keith-Magee2011-04-023-29/+0
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@15985 bcc190cf-cafb-0310-a4f2-bffc1f526a37