diff options
| author | Steve Piercy <web@stevepiercy.com> | 2019-12-25 23:45:57 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2020-01-02 23:30:59 -0800 |
| commit | c86c61bfbab809d55b8d1a53e4a2b47505317720 (patch) | |
| tree | 8bbaec2f37c2538f0d421287f5e7877a5ec697b5 /docs/quick_tour/sqla_demo | |
| parent | 94fd8de4263dc6294aa62425a5f98d905ef0584a (diff) | |
| download | pyramid-c86c61bfbab809d55b8d1a53e4a2b47505317720.tar.gz pyramid-c86c61bfbab809d55b8d1a53e4a2b47505317720.tar.bz2 pyramid-c86c61bfbab809d55b8d1a53e4a2b47505317720.zip | |
Use package name instead of relative path for the renderer
Diffstat (limited to 'docs/quick_tour/sqla_demo')
| -rw-r--r-- | docs/quick_tour/sqla_demo/sqla_demo/views/default.py | 2 | ||||
| -rw-r--r-- | docs/quick_tour/sqla_demo/sqla_demo/views/notfound.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/quick_tour/sqla_demo/sqla_demo/views/default.py b/docs/quick_tour/sqla_demo/sqla_demo/views/default.py index a6b05c558..3aadb905f 100644 --- a/docs/quick_tour/sqla_demo/sqla_demo/views/default.py +++ b/docs/quick_tour/sqla_demo/sqla_demo/views/default.py @@ -6,7 +6,7 @@ from sqlalchemy.exc import DBAPIError from .. import models -@view_config(route_name='home', renderer='../templates/mytemplate.jinja2') +@view_config(route_name='home', renderer='sqla_demo:templates/mytemplate.jinja2') def my_view(request): try: query = request.dbsession.query(models.MyModel) diff --git a/docs/quick_tour/sqla_demo/sqla_demo/views/notfound.py b/docs/quick_tour/sqla_demo/sqla_demo/views/notfound.py index 69d6e2804..3e088ab15 100644 --- a/docs/quick_tour/sqla_demo/sqla_demo/views/notfound.py +++ b/docs/quick_tour/sqla_demo/sqla_demo/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='sqla_demo:templates/404.jinja2') def notfound_view(request): request.response.status = 404 return {} |
