aboutsummaryrefslogtreecommitdiff
path: root/fietsboek/pshell.py
diff options
context:
space:
mode:
Diffstat (limited to 'fietsboek/pshell.py')
-rw-r--r--fietsboek/pshell.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/fietsboek/pshell.py b/fietsboek/pshell.py
new file mode 100644
index 0000000..b0847ee
--- /dev/null
+++ b/fietsboek/pshell.py
@@ -0,0 +1,13 @@
+from . import models
+
+
+def setup(env):
+ request = env['request']
+
+ # start a transaction
+ request.tm.begin()
+
+ # inject some vars into the shell builtins
+ env['tm'] = request.tm
+ env['dbsession'] = request.dbsession
+ env['models'] = models