Ticket #6430: egg_template_loader.patch

File egg_template_loader.patch, 676 bytes (added by Juan Manuel Caicedo <juan.manuel.caicedo@…>, 17 years ago)

Patch for loading template files from Python eggs

  • django/template/loaders/eggs.py

     
    1818        pkg_name = 'templates/' + template_name
    1919        for app in settings.INSTALLED_APPS:
    2020            try:
    21                 return (resource_string(app, pkg_name), 'egg:%s:%s ' % (app, pkg_name)).decode(settings.FILE_CHARSET)
     21                return (resource_string(app, pkg_name).decode(settings.FILE_CHARSET), 'egg:%s:%s ' % (app, pkg_name))
    2222            except:
    2323                pass
    2424    raise TemplateDoesNotExist, template_name
Back to Top