Read template settings

def get_template_setting(template_key, default=None):
    """ Read template settings """
    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