Load templates from templates-subdirectory
instead of package-root
This commit is contained in:
parent
3acb1af132
commit
b8d2df4650
|
@ -3,7 +3,7 @@
|
||||||
import logging
|
import logging
|
||||||
from codecs import open
|
from codecs import open
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from os.path import dirname
|
from os.path import dirname, join
|
||||||
|
|
||||||
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader
|
from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader
|
||||||
|
|
||||||
|
@ -57,8 +57,8 @@ def render_template(clients, output, title='TeamspeakStats',
|
||||||
|
|
||||||
# render
|
# render
|
||||||
template_loader = ChoiceLoader([
|
template_loader = ChoiceLoader([
|
||||||
PackageLoader(__package__, ''),
|
PackageLoader(__package__, 'templates'),
|
||||||
FileSystemLoader(dirname(__file__))
|
FileSystemLoader(join(dirname(__file__), 'templates'))
|
||||||
])
|
])
|
||||||
template_env = Environment(loader=template_loader)
|
template_env = Environment(loader=template_loader)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue