From dc3f6e41137a6b138d777b1449790753e825d5d2 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 17 Oct 2005 01:53:22 +0000 Subject: [PATCH] Changed internal variable names in django.core.template.loaders.eggs to be consistent with filesystem git-svn-id: http://code.djangoproject.com/svn/django/trunk@889 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/template/loaders/eggs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django/core/template/loaders/eggs.py b/django/core/template/loaders/eggs.py index b1e221ee1c..33ba043220 100644 --- a/django/core/template/loaders/eggs.py +++ b/django/core/template/loaders/eggs.py @@ -8,18 +8,18 @@ except ImportError: from django.core.template import TemplateDoesNotExist from django.conf.settings import INSTALLED_APPS, TEMPLATE_FILE_EXTENSION -def load_template_source(name, dirs=None): +def load_template_source(template_name, template_dirs=None): """ Loads templates from Python eggs via pkg_resource.resource_string. - For every installed app, it tries to get the resource (app, name). + For every installed app, it tries to get the resource (app, template_name). """ if resource_string is not None: - pkg_name = 'templates/' + name + TEMPLATE_FILE_EXTENSION + pkg_name = 'templates/' + template_name + TEMPLATE_FILE_EXTENSION for app in INSTALLED_APPS: try: return resource_string(app, pkg_name) except: pass - raise TemplateDoesNotExist, name + raise TemplateDoesNotExist, template_name load_template_source.is_usable = resource_string is not None