Load templates from templates-subdirectory

instead of package-root
This commit is contained in:
Thor77 2016-11-18 21:42:27 +01:00
parent 3acb1af132
commit b8d2df4650
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
import logging
from codecs import open
from datetime import datetime
from os.path import dirname
from os.path import dirname, join
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader
@ -57,8 +57,8 @@ def render_template(clients, output, title='TeamspeakStats',
# render
template_loader = ChoiceLoader([
PackageLoader(__package__, ''),
FileSystemLoader(dirname(__file__))
PackageLoader(__package__, 'templates'),
FileSystemLoader(join(dirname(__file__), 'templates'))
])
template_env = Environment(loader=template_loader)