summaryrefslogtreecommitdiff
path: root/django/template/loaders/filesystem.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-1/+0
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-1/+1
|
* Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.Tim Graham2017-01-251-6/+2
|
* Refs #23919 -- Replaced io.open() with open().Aymeric Augustin2017-01-181-2/+1
| | | | io.open() is an alias for open() on Python 3.
* Refs #15053 -- Removed support for non-recursive template loading.Tim Graham2017-01-171-19/+2
| | | | Per deprecation timeline.
* Fixed #27598 -- Allowed specifying directories for a filesystem template loader.Tim Graham2016-12-141-1/+5
| | | | Thanks Carl Meyer for review.
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-241-2/+2
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Moved engine-related exceptions to django.template.exceptions.Preston Timmons2015-05-061-1/+1
| | | | | | 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-221-12/+32
|
* 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-021-9/+6
| | | | | | | implementation. Besides the directories they look in, these two loaders are functionally the same. This removes unnecessary code duplication between the two.
* Fixed #24235 -- Removed is_usable attribute from template loaders.Preston Timmons2015-02-041-2/+0
|
* Removed dependency of template loaders on Django settings.Aymeric Augustin2014-11-231-4/+4
|
* Moved all template loaders under django.template.loaders.Aymeric Augustin2014-11-161-1/+2
| | | | | | | | | | | | 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-111-2/+4
| | | | `io.open` is required on Python 2.7. Just `open` would work on Python 3.
* Raised SuspiciousFileOperation in safe_join.Aymeric Augustin2014-11-111-7/+4
| | | | | | | | | | | | | | | 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.
* Fixed the remaining E302 violations int eh django packageAlex Gaynor2013-11-021-0/+1
|
* Fixed #19729 -- Removed leftover refactoring helper variables.Ramiro Morales2013-02-041-2/+0
| | | | | | Thanks chrismedrela for the report. Refs #6262, 44b9076 and 4d94c0c.
* Specified when open should use binary mode.Claude Paroz2012-05-251-1/+1
| | | | Thanks Vinaj Sajip for the help of his django3 branch.
* Made more extensive usage of context managers with open.Claude Paroz2012-05-051-5/+2
|
* Advanced deprecations in django.template.Russell Keith-Magee2011-04-021-10/+0
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@15985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12248 -- Refactored django.template to get code out of __init__.py, ↵Russell Keith-Magee2010-11-271-1/+1
| | | | | | 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
* Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to ↵Russell Keith-Magee2010-10-111-1/+1
| | | | | | DeprecationWarnings, and removed 1.1 deprecated code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty2010-01-101-1/+1
| | | | | | 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
* Fixed #6262 -- Added a cached template loader, and modified existing ↵Russell Keith-Magee2009-12-141-30/+50
| | | | | | 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
* Added some better error reporting and path handling when creating template ↵Malcolm Tredinnick2008-10-061-1/+11
| | | | | | | | | | | | | 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
* Fixed #4952 -- Fixed the `get_template_sources` functions of the ↵Gary Wilson Jr2007-07-231-3/+9
| | | | | | `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
* Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick2007-07-041-1/+1
| | | | | | | | | 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
* Fixed incorrect error message in django.template.loaders.filesystem if you ↵Adrian Holovaty2006-08-131-1/+1
| | | | | | pass in template_dirs=None. Thanks, Martin Glueck git-svn-id: http://code.djangoproject.com/svn/django/trunk@3575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty2006-05-021-0/+25
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