diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-07-21 18:15:02 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-07-21 18:15:02 +0000 |
| commit | 422aadfe2aea988927888b970fcce4e8ce492fac (patch) | |
| tree | 7044d03417220c659eb18f7de54a1a5be65150b7 | |
| parent | e2385e3c535cc7f48200d8d0bd3fea61eafcb98e (diff) | |
[multi-db] Updated runshell() calls to accept settings.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/__init__.py | 3 | ||||
| -rw-r--r-- | django/db/backends/ado_mssql/client.py | 2 | ||||
| -rw-r--r-- | django/db/backends/mysql/client.py | 3 | ||||
| -rw-r--r-- | django/db/backends/oracle/client.py | 3 | ||||
| -rw-r--r-- | django/db/backends/postgresql/client.py | 3 | ||||
| -rw-r--r-- | django/db/backends/sqlite3/client.py | 3 |
6 files changed, 7 insertions, 10 deletions
diff --git a/django/db/__init__.py b/django/db/__init__.py index 6f6e3ba6ed..641db6c012 100644 --- a/django/db/__init__.py +++ b/django/db/__init__.py @@ -97,7 +97,8 @@ class ConnectionInfo(object): def runshell(self): __import__('django.db.backends.%s.client' % - self.settings.DATABASE_ENGINE, '', '', ['']).runshell() + self.settings.DATABASE_ENGINE, '', '', [''] + ).runshell(self.settings) def reset_queries(self): """Reset log of queries executed by connection""" diff --git a/django/db/backends/ado_mssql/client.py b/django/db/backends/ado_mssql/client.py index 5c197cafa4..a5bd617ff1 100644 --- a/django/db/backends/ado_mssql/client.py +++ b/django/db/backends/ado_mssql/client.py @@ -1,2 +1,2 @@ -def runshell(): +def runshell(settings): raise NotImplementedError diff --git a/django/db/backends/mysql/client.py b/django/db/backends/mysql/client.py index f9d6297b8e..917437e81c 100644 --- a/django/db/backends/mysql/client.py +++ b/django/db/backends/mysql/client.py @@ -1,7 +1,6 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = [''] args += ["--user=%s" % settings.DATABASE_USER] if settings.DATABASE_PASSWORD: diff --git a/django/db/backends/oracle/client.py b/django/db/backends/oracle/client.py index 7e32ebef2f..48954fe790 100644 --- a/django/db/backends/oracle/client.py +++ b/django/db/backends/oracle/client.py @@ -1,7 +1,6 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = '' args += settings.DATABASE_USER if settings.DATABASE_PASSWORD: diff --git a/django/db/backends/postgresql/client.py b/django/db/backends/postgresql/client.py index 8123ec7848..38428a9c62 100644 --- a/django/db/backends/postgresql/client.py +++ b/django/db/backends/postgresql/client.py @@ -1,7 +1,6 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = ['psql'] if settings.DATABASE_USER: args += ["-U", settings.DATABASE_USER] diff --git a/django/db/backends/sqlite3/client.py b/django/db/backends/sqlite3/client.py index 097218341f..43978da0be 100644 --- a/django/db/backends/sqlite3/client.py +++ b/django/db/backends/sqlite3/client.py @@ -1,6 +1,5 @@ -from django.conf import settings import os -def runshell(): +def runshell(settings): args = ['', settings.DATABASE_NAME] os.execvp('sqlite3', args) |
