diff --git a/gluon/shell.py b/gluon/shell.py index 95359c3a5..9d93f1a6d 100644 --- a/gluon/shell.py +++ b/gluon/shell.py @@ -15,6 +15,7 @@ import os import sys import code +import copy import logging import types import re @@ -167,6 +168,8 @@ def check_credentials(request, other_application='admin'): sys.stderr.write(e.traceback + '\n') sys.exit(1) + response._view_environment = copy.copy(environment) + environment['__name__'] = '__main__' return environment