1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #24399 -- Made filesystem loaders use more specific exceptions.

This commit is contained in:
Preston Timmons
2015-03-02 13:31:14 -06:00
committed by Aymeric Augustin
parent 85757d0e79
commit 70123cf084
5 changed files with 50 additions and 43 deletions

View File

@@ -224,6 +224,19 @@ the keyword argument ``clear=True``.
assignment for many-to-many relations and as a consequence now use the new
behavior.
Filesystem-based template loaders catch more specific exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When using the :class:`filesystem.Loader <django.template.loaders.filesystem.Loader>`
or :class:`app_directories.Loader <django.template.loaders.app_directories.Loader>`
template loaders, earlier versions of Django raised a
:exc:`~django.template.TemplateDoesNotExist` error if a template source existed
but was unreadable. This could happen under many circumstances, such as if
Django didn't have permissions to open the file, or if the template source was
a directory. Now, Django only silences the exception if the template source
does not exist. All other situations result in the original ``IOError`` being
raised.
Miscellaneous
~~~~~~~~~~~~~