diff --git a/printing/templates/templates.py b/printing/templates/templates.py index 8d4d5d9..e4a4aee 100644 --- a/printing/templates/templates.py +++ b/printing/templates/templates.py @@ -3,6 +3,7 @@ from gestion.affichage import style, tableau import importlib +import os import time import ldap import sys @@ -161,7 +162,8 @@ def template(dialog=False): tableau = newTableau newStyle = lambda *args,**kwargs:oldstyle(*args,dialog=dialog,**kwargs) style = newStyle - template_path = '/usr/scripts/lc_ldap/printing/templates/' + #template_path = '/usr/scripts/lc_ldap/printing/templates/' + template_path = os.path.dirname(os.path.abspath(__file__)) + '/' templateLoader = jinja2.FileSystemLoader( searchpath=["/", template_path] ) templateEnv = jinja2.Environment( loader=templateLoader, trim_blocks=True ) templateEnv.add_extension('jinja2.ext.do')