  except ImportError:
      resource_string = None
  
  from django.apps import apps
  from django.conf import settings
  from django.template.base import TemplateDoesNotExist
  from django.utils import six
  
  from .base import Loader as BaseLoader
  
 
</s> remove from django.conf import settings
 </s> add  </s> remove from django.conf import settings
 </s> add  </s> remove             template_dirs = settings.TEMPLATE_DIRS
 </s> add             template_dirs = self.engine.dirs </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:
  except ImportError:
      resource_string = None
  
  from django.apps import apps

  from django.template.base import TemplateDoesNotExist
  from django.utils import six
  
  from .base import Loader as BaseLoader
  
keep keep keep keep replace keep keep keep keep keep
 Removed dependency of template loaders on Django settings. 
django/template/loaders/eggs.py