summaryrefslogtreecommitdiff
path: root/django/template/loaders/filesystem.py
AgeCommit message (Collapse)Author
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
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-18Refs #23919 -- Replaced io.open() with open().Aymeric Augustin
io.open() is an alias for open() on Python 3.
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.
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
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-04Fixed #24235 -- Removed is_usable attribute from template loaders.Preston Timmons
2014-11-23Removed dependency of template loaders on Django settings.Aymeric Augustin
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-11-02Fixed the remaining E302 violations int eh django packageAlex Gaynor
2013-02-04Fixed #19729 -- Removed leftover refactoring helper variables.Ramiro Morales
Thanks chrismedrela for the report. Refs #6262, 44b9076 and 4d94c0c.
2012-05-25Specified when open should use binary mode.Claude Paroz
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-05Made more extensive usage of context managers with open.Claude Paroz
2011-04-02Advanced deprecations in django.template.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-27Fixed #12248 -- Refactored django.template to get code out of __init__.py, ↵Russell Keith-Magee
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
2010-10-11Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to ↵Russell Keith-Magee
DeprecationWarnings, and removed 1.1 deprecated code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty
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
2009-12-14Fixed #6262 -- Added a cached template loader, and modified existing ↵Russell Keith-Magee
template loaders and tag to be cacheable. Thanks to Mike Malone for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-06Added some better error reporting and path handling when creating template ↵Malcolm Tredinnick
paths. We now raise UnicodeDecodeError for non-UTF-8 bytestrings (thanks to Daniel Pope for diagnosing this was being swallowed by ValueError) and allow UTF-8 bytestrings as template directories. Refs #8965. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23Fixed #4952 -- Fixed the `get_template_sources` functions of the ↵Gary Wilson Jr
`app_directories` and `filesystem` template loaders to not return paths outside of given template directories. Both functions now make use of a new `safe_join` utility function. Thanks to SmileyChris for help with the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5750 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-13Fixed incorrect error message in django.template.loaders.filesystem if you ↵Adrian Holovaty
pass in template_dirs=None. Thanks, Martin Glueck git-svn-id: http://code.djangoproject.com/svn/django/trunk@3575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37