Index: django/views/debug.py =================================================================== --- django/views/debug.py (revision 7022) +++ django/views/debug.py (working copy) @@ -82,7 +82,9 @@ source_list_func = getattr(__import__(loader.__module__, {}, {}, ['get_template_sources']), 'get_template_sources') # NOTE: This assumes exc_value is the name of the template that # the loader attempted to load. - template_list = [{'name': t, 'exists': os.path.exists(t)} \ + template_list = [{'name': t, + 'exists': os.path.exists(t), + 'readable': os.access(t, os.R_OK)} for t in source_list_func(str(exc_value))] except (ImportError, AttributeError): template_list = [] @@ -392,7 +394,7 @@
{{ loader.loader }}
:
- {{ t.name }}
(File {% if t.exists %}exists{% else %}does not exist{% endif %}){{ t.name }}
(File {% if t.exists %}exists{% if not t.readable %} but is not readable{% endif %}{% else %}does not exist{% endif %})