jinja source template fix

This commit is contained in:
Charlie Jacomme 2018-08-09 16:16:42 +02:00
parent cc850b7d70
commit 37a453dcb9

View file

@ -29,8 +29,8 @@ client_hostname = socket.gethostname().split('.', 1)[0]
def generate(api_client):
all_users = api_client.list("localemail/users")
# Création de l'environnement Jinja
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template(path+'/templates/list')
env = Environment(loader=FileSystemLoader(path))
template = env.get_template('templates/list')
aliases_rendered = template.render(data=all_users)
fichier = open(path+'/generated/aliases','w')