From 5c4c25b63d574562ea93687c95e654d5571b5710 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 11 Jan 2018 10:42:38 +0100 Subject: [PATCH] Mention how to specify the config file location and how to do that when using ipython. --- scripts/db_shell.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/db_shell.py b/scripts/db_shell.py index c896ec04af6..6850dede093 100644 --- a/scripts/db_shell.py +++ b/scripts/db_shell.py @@ -1,12 +1,15 @@ # This script allows easy access to Galaxy's database layer via the # Galaxy models. For example: -# % python -i scripts/db_shell.py +# % python -i scripts/db_shell.py -c config/galaxy.ini # >>> new_user = User("admin@gmail.com") # >>> new_user.set_password # >>> sa_session.add(new_user) # >>> sa_session.commit() # >>> sa_session.query(User).all() # +# If you use ipython use: +# % ipython -i scripts/db_shell.py -- -c config/galaxy.ini +# # You can also use this script as a library, for instance see https://gist.github.com/1979583 # TODO: This script overlaps a lot with manage_db.py and create_db.py, # these should maybe be refactored to remove duplication.