1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

Fixed #6430 -- Corrected the loading of templates from eggs, which was broken by the unicode merge. Thanks for the excellent report and patch, Juan Manuel Caicedo <juan.manuel.caicedo@gmail.com>.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2008-05-29 13:11:23 +00:00
parent d4d5f4ce2f
commit d53e8f1285
4 changed files with 96 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ def load_template_source(template_name, template_dirs=None):
pkg_name = 'templates/' + template_name
for app in settings.INSTALLED_APPS:
try:
return (resource_string(app, pkg_name), 'egg:%s:%s ' % (app, pkg_name)).decode(settings.FILE_CHARSET)
return (resource_string(app, pkg_name).decode(settings.FILE_CHARSET), 'egg:%s:%s' % (app, pkg_name))
except:
pass
raise TemplateDoesNotExist, template_name