Ticket #6412: tmp.patch
File tmp.patch, 1.4 KB (added by , 17 years ago) |
---|
-
django/views/debug.py
82 82 source_list_func = getattr(__import__(loader.__module__, {}, {}, ['get_template_sources']), 'get_template_sources') 83 83 # NOTE: This assumes exc_value is the name of the template that 84 84 # the loader attempted to load. 85 template_list = [{'name': t, 'exists': os.path.exists(t)} \ 85 template_list = [{'name': t, 86 'exists': os.path.exists(t), 87 'readable': os.access(t, os.R_OK)} 86 88 for t in source_list_func(str(exc_value))] 87 89 except (ImportError, AttributeError): 88 90 template_list = [] … … 392 394 <ul> 393 395 {% for loader in loader_debug_info %} 394 396 <li>Using loader <code>{{ loader.loader }}</code>: 395 <ul>{% for t in loader.templates %}<li><code>{{ t.name }}</code> (File {% if t.exists %}exists{% else %}does not exist{% endif %})</li>{% endfor %}</ul>397 <ul>{% for t in loader.templates %}<li><code>{{ t.name }}</code> (File {% if t.exists %}exists{% if not t.readable %} but is not readable{% endif %}{% else %}does not exist{% endif %})</li>{% endfor %}</ul> 396 398 </li> 397 399 {% endfor %} 398 400 </ul>