          directory in "template_dirs". Any paths that don't lie inside one of the
          template dirs are excluded from the result set, for security reasons.
          """
          if not template_dirs:
              template_dirs = settings.TEMPLATE_DIRS
          for template_dir in template_dirs:
              try:
                  yield safe_join(template_dir, template_name)
              except SuspiciousFileOperation:
                  # The joined path was located outside of this template_dir
 
</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                 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             error_msg = "Your TEMPLATE_DIRS setting is empty. Change it to point to at least one template directory."
 </s> add             error_msg = ("Your template directories configuration is empty. "
                         "Change it to point to at least one template directory.") </s> remove                  loaders=None, string_if_invalid=''):
 </s> add                  loaders=None, string_if_invalid='',
                 file_charset=None):
            template_dirs = self.engine.dirs
          directory in "template_dirs". Any paths that don't lie inside one of the
          template dirs are excluded from the result set, for security reasons.
          """
          if not template_dirs:
            template_dirs = self.engine.dirs
          for template_dir in template_dirs:
              try:
                  yield safe_join(template_dir, template_name)
              except SuspiciousFileOperation:
                  # The joined path was located outside of this template_dir
keep keep keep keep replace keep keep keep keep keep
 Removed dependency of template loaders on Django settings. 
django/template/loaders/filesystem.py