summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastermain
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-12-02 10:02:34 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-07 17:19:04 +0000
commitfabe9c8f14fd7b8ab204a2b610c64ac5b62135ac (patch)
tree747bad3cecb4ccc093118de5db0c33992c03c7a7 /lib/toaster/toastermain
parent7e8632c0527245c1474e487dd9a972948e794471 (diff)
downloadbitbake-fabe9c8f14fd7b8ab204a2b610c64ac5b62135ac.tar.gz
toaster: implement get-dburl command
Implemented management command to call getDATABASE_URL API. It will be used to get database url from toaster shell script by running 'manage.py get-dburl' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastermain')
-rw-r--r--lib/toaster/toastermain/management/commands/get-dburl.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/toaster/toastermain/management/commands/get-dburl.py b/lib/toaster/toastermain/management/commands/get-dburl.py
new file mode 100644
index 000000000..22b3eb79e
--- /dev/null
+++ b/lib/toaster/toastermain/management/commands/get-dburl.py
@@ -0,0 +1,9 @@
+from toastermain.settings import getDATABASE_URL
+from django.core.management.base import NoArgsCommand
+
+class Command(NoArgsCommand):
+ args = ""
+ help = "get database url"
+
+ def handle_noargs(self,**options):
+ print getDATABASE_URL()