From c86c61bfbab809d55b8d1a53e4a2b47505317720 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 25 Dec 2019 23:45:57 -0800 Subject: Use package name instead of relative path for the renderer --- docs/quick_tour/logging/hello_world/views/default.py | 2 +- docs/quick_tour/logging/hello_world/views/notfound.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/quick_tour/logging') diff --git a/docs/quick_tour/logging/hello_world/views/default.py b/docs/quick_tour/logging/hello_world/views/default.py index bbb99d78c..4bbc01e11 100644 --- a/docs/quick_tour/logging/hello_world/views/default.py +++ b/docs/quick_tour/logging/hello_world/views/default.py @@ -3,7 +3,7 @@ from pyramid.view import view_config import logging log = logging.getLogger(__name__) -@view_config(route_name='home', renderer='../templates/mytemplate.jinja2') +@view_config(route_name='home', renderer='hello_world:templates/mytemplate.jinja2') def my_view(request): log.debug('Some Message') return {'project': 'hello_world'} diff --git a/docs/quick_tour/logging/hello_world/views/notfound.py b/docs/quick_tour/logging/hello_world/views/notfound.py index 69d6e2804..6d0ff4193 100644 --- a/docs/quick_tour/logging/hello_world/views/notfound.py +++ b/docs/quick_tour/logging/hello_world/views/notfound.py @@ -1,7 +1,7 @@ from pyramid.view import notfound_view_config -@notfound_view_config(renderer='../templates/404.jinja2') +@notfound_view_config(renderer='hello_world:templates/404.jinja2') def notfound_view(request): request.response.status = 404 return {} -- cgit v1.2.3