code: def get_template_setting(template_key, default=None):
      
      templates_var = getattr(settings, 'TEMPLATES', None)
      if templates_var:
          for tdict in templates_var:
              if template_key in tdict:
                  return tdict[template_key]
      return default
docs: Read template settings