Skip to content

Commit 89762e9

Browse files
committed
Fix MetaLink to use TEMPLATE_ENV
1 parent 61cbdc7 commit 89762e9

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

pywps/inout/outputs.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -525,16 +525,8 @@ def url(self):
525525

526526
def _load_template(self):
527527
from jinja2 import PackageLoader
528-
529-
# TODO: Use TEMPLATE_ENV directly
530-
from pywps.response import RelEnvironment
531-
532-
template_env = RelEnvironment(
533-
loader=PackageLoader('pywps', 'templates'),
534-
trim_blocks=True, lstrip_blocks=True,
535-
autoescape=True, )
536-
537-
self._template = template_env.get_template(self._xml_template)
528+
from pywps.response.basic import TEMPLATE_ENV
529+
self._template = TEMPLATE_ENV.get_template(self._xml_template)
538530

539531

540532
class MetaLink4(MetaLink):

0 commit comments

Comments
 (0)