From 999e7b7512adffb49a26ee81758007fe9b714eec Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 14 Nov 2017 00:47:40 -0600 Subject: [PATCH] fixed layout in lack of configuration --- applications/welcome/views/layout.html | 2 +- gluon/compileapp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/welcome/views/layout.html b/applications/welcome/views/layout.html index 41981fd0..c16bb0ea 100644 --- a/applications/welcome/views/layout.html +++ b/applications/welcome/views/layout.html @@ -94,7 +94,7 @@ {{block center}} {{include}} {{end}} - {{=response.toolbar() if configuration.get('app.toolbar') else ''}} + {{=response.toolbar() if 'configuration' in globals() and configuration.get('app.toolbar') else ''}} diff --git a/gluon/compileapp.py b/gluon/compileapp.py index 1e0d3ef0..0d61afb3 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -724,7 +724,7 @@ def run_view_in(environment): context=environment) # Compile template ccode = compile2(scode, filename) - layer = filename + layer = filename restricted(ccode, environment, layer=layer, scode=scode) # parse_template saves everything in response body return environment['response'].body.getvalue()