  
      def load_template_source(self, template_name, template_dirs=None):
          for filepath in self.get_template_sources(template_name, template_dirs):
              try:
                  with io.open(filepath, encoding=settings.FILE_CHARSET) as fp:
                      return fp.read(), filepath
              except IOError:
                  pass
          raise TemplateDoesNotExist(template_name)
 
</s> remove                 with io.open(filepath, encoding=settings.FILE_CHARSET) as fp:
 </s> add                 with io.open(filepath, encoding=self.engine.file_charset) as fp: </s> remove                     resource = resource.decode(settings.FILE_CHARSET)
 </s> add                     resource = resource.decode(self.engine.file_charset) </s> remove             template_dirs = settings.TEMPLATE_DIRS
 </s> add             template_dirs = self.engine.dirs </s> remove from django.conf import settings
 </s> add 
                with io.open(filepath, encoding=self.engine.file_charset) as fp:
  
      def load_template_source(self, template_name, template_dirs=None):
          for filepath in self.get_template_sources(template_name, template_dirs):
              try:
                with io.open(filepath, encoding=self.engine.file_charset) as fp:
                      return fp.read(), filepath
              except IOError:
                  pass
          raise TemplateDoesNotExist(template_name)
keep keep keep keep replace keep keep keep keep
 Removed dependency of template loaders on Django settings. 
django/template/loaders/app_directories.py