'Loads templates from Python eggs via pkg_resource.resource_string.
For every installed app, it tries to get the resource (app, template_name).'

def load_template_source(self, template_name, template_dirs=None):

    if (resource_string is not None):
        pkg_name = (u'templates/' + template_name)
        for app in settings.INSTALLED_APPS:
            try:
                resource = resource_string(app, pkg_name)
            except Exception:
                continue
            if six.PY2:
                resource = resource.decode(settings.FILE_CHARSET)
            return (resource, (u'egg:%s:%s' % (app, pkg_name)))
    raise TemplateDoesNotExist(template_name)
