1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

[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
This commit is contained in:
Jason Pellerin 2006-07-21 18:15:02 +00:00
parent e2385e3c53
commit 422aadfe2a
6 changed files with 7 additions and 10 deletions

View File

@ -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"""

View File

@ -1,2 +1,2 @@
def runshell():
def runshell(settings):
raise NotImplementedError

View File

@ -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:

View File

@ -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:

View File

@ -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]

View File

@ -1,6 +1,5 @@
from django.conf import settings
import os
def runshell():
def runshell(settings):
args = ['', settings.DATABASE_NAME]
os.execvp('sqlite3', args)