diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2006-08-27 12:35:07 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2006-08-27 12:35:07 +0000 |
| commit | 89fa97b8374131614698bbab1544f9bdafdb66bd (patch) | |
| tree | 4c2af52d9fb5d45a24c4dea6ac63d647e7f147c1 /django/views | |
| parent | 7dce86ce0220ffb9f3f579cbd1e881e988764c9d (diff) | |
Refs #2333 - Added a signal that is emitted whenever a template is rendered, and added a 'name' field to Template to allow easy identification of templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/debug.py | 6 | ||||
| -rw-r--r-- | django/views/static.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index 6934360afd..f15eb8ff01 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -115,7 +115,7 @@ def technical_500_response(request, exc_type, exc_value, tb): 'function': '?', 'lineno': '?', }] - t = Template(TECHNICAL_500_TEMPLATE) + t = Template(TECHNICAL_500_TEMPLATE, name='Technical 500 Template') c = Context({ 'exception_type': exc_type.__name__, 'exception_value': exc_value, @@ -141,7 +141,7 @@ def technical_404_response(request, exception): # tried exists but is an empty list. The URLconf must've been empty. return empty_urlconf(request) - t = Template(TECHNICAL_404_TEMPLATE) + t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 Template') c = Context({ 'root_urlconf': settings.ROOT_URLCONF, 'urlpatterns': tried, @@ -154,7 +154,7 @@ def technical_404_response(request, exception): def empty_urlconf(request): "Create an empty URLconf 404 error response." - t = Template(EMPTY_URLCONF_TEMPLATE) + t = Template(EMPTY_URLCONF_TEMPLATE, name='Empty URLConf Template') c = Context({ 'project_name': settings.SETTINGS_MODULE.split('.')[0] }) diff --git a/django/views/static.py b/django/views/static.py index ac323944d0..a8c8328014 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -81,7 +81,7 @@ def directory_index(path, fullpath): try: t = loader.get_template('static/directory_index') except TemplateDoesNotExist: - t = Template(DEFAULT_DIRECTORY_INDEX_TEMPLATE) + t = Template(DEFAULT_DIRECTORY_INDEX_TEMPLATE, name='Default Directory Index Template') files = [] for f in os.listdir(fullpath): if not f.startswith('.'): |
