summaryrefslogtreecommitdiffstats
path: root/webapp/django/db/backends/oracle/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/django/db/backends/oracle/client.py')
-rw-r--r--webapp/django/db/backends/oracle/client.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/webapp/django/db/backends/oracle/client.py b/webapp/django/db/backends/oracle/client.py
new file mode 100644
index 0000000000..77fc9b9847
--- /dev/null
+++ b/webapp/django/db/backends/oracle/client.py
@@ -0,0 +1,13 @@
+from django.db.backends import BaseDatabaseClient
+from django.conf import settings
+import os
+
+class DatabaseClient(BaseDatabaseClient):
+ def runshell(self):
+ dsn = settings.DATABASE_USER
+ if settings.DATABASE_PASSWORD:
+ dsn += "/%s" % settings.DATABASE_PASSWORD
+ if settings.DATABASE_NAME:
+ dsn += "@%s" % settings.DATABASE_NAME
+ args = ["sqlplus", "-L", dsn]
+ os.execvp("sqlplus", args)