1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Use the ressource system in order to locate the templates directory

This commit is contained in:
Julien Duponchelle 2015-07-03 20:03:37 +02:00
parent 3cacf400ff
commit f3f152cd2a

View File

@ -22,10 +22,11 @@ import logging
import sys import sys
import jinja2 import jinja2
from ..utils.get_resource import get_resource
from ..version import __version__ from ..version import __version__
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
renderer = jinja2.Environment(loader=jinja2.PackageLoader('gns3server', 'templates')) renderer = jinja2.Environment(loader=jinja2.FileSystemLoader(get_resource('templates')))
class Response(aiohttp.web.Response): class Response(aiohttp.web.Response):