From 28333c1a217c71aa02eac9e92bc37e8a9ffaa370 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 24 Nov 2020 21:18:00 +1100 Subject: [PATCH] Add a simple "shell" task --- tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks.py b/tasks.py index 30641c7c81..69c53b83d4 100644 --- a/tasks.py +++ b/tasks.py @@ -102,6 +102,16 @@ def install(c): print("Config file 'config.yaml' does not exist - copying from template.") copyfile(CONFIG_TEMPLATE_FILE, CONFIG_FILE) + +@task +def shell(c): + """ + Open a python shell with access to the InvenTree database models. + """ + + manage(c, 'shell', pty=True) + + @task def superuser(c): """