"""
Wrapper for loading templates from the filesystem.
"""

from threading import local
from django.conf import settings
from django.template.base import TemplateDoesNotExist
from django.template import loader
from django.utils._os import safe_join

thread_vars = local()


class TemplationLoader(loader.app_directories.Loader):

    def get_template_sources(self, template_name, template_dirs=None):
        pass

    def load_template_sources(self, template_name, template_dirs=None):
        pass

@@ -97,158 +97,33 @@
 ngo.
-conf import settings%0Afrom django.template.base import TemplateDoesNotExist%0Afrom django.template import loader%0Afrom django.utils._os import safe_join%0A%0A
+template import loader%0A%0A_
 thre
@@ -197,17 +197,16 @@
 oader):%0A
-%0A
     def 
@@ -280,95 +280,361 @@
     
-pass%0A%0A    def load_template_sources(self, template_name, template_dirs=None):%0A        pass
+%22%22%22 Add the resource dir to the available dirs. %22%22%22%0A%0A        res = getattr(_thread_vars, 'resource_access', None)%0A        if res:%0A            template_dirs = (res.get_absolute_url(),) + (template_dirs or ())%0A%0A        super(TemplationLoader, self).get_template_sources(template_name,%0A                                                           template_dirs)
 %0A

add template loader