Author: jpellerin
Date: 2006-07-21 13:15:02 -0500 (Fri, 21 Jul 2006)
New Revision: 3412
Modified:
django/branches/multiple-db-support/django/db/__init__.py
django/branches/multiple-db-support/django/db/backends/ado_mssql/client.py
django/branches/multiple-db-support/django/db/backends/mysql/client.py
django/branches/multiple-db-support/django/db/backends/oracle/client.py
django/branches/multiple-db-support/django/db/backends/postgresql/client.py
django/branches/multiple-db-support/django/db/backends/sqlite3/client.py
Log:
[multi-db] Updated runshell() calls to accept settings.
Modified: django/branches/multiple-db-support/django/db/__init__.py
===================================================================
--- django/branches/multiple-db-support/django/db/__init__.py 2006-07-21
17:11:13 UTC (rev 3411)
+++ django/branches/multiple-db-support/django/db/__init__.py 2006-07-21
18:15:02 UTC (rev 3412)
@@ -97,7 +97,8 @@
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"""
Modified:
django/branches/multiple-db-support/django/db/backends/ado_mssql/client.py
===================================================================
--- django/branches/multiple-db-support/django/db/backends/ado_mssql/client.py
2006-07-21 17:11:13 UTC (rev 3411)
+++ django/branches/multiple-db-support/django/db/backends/ado_mssql/client.py
2006-07-21 18:15:02 UTC (rev 3412)
@@ -1,2 +1,2 @@
-def runshell():
+def runshell(settings):
raise NotImplementedError
Modified: django/branches/multiple-db-support/django/db/backends/mysql/client.py
===================================================================
--- django/branches/multiple-db-support/django/db/backends/mysql/client.py
2006-07-21 17:11:13 UTC (rev 3411)
+++ django/branches/multiple-db-support/django/db/backends/mysql/client.py
2006-07-21 18:15:02 UTC (rev 3412)
@@ -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:
Modified:
django/branches/multiple-db-support/django/db/backends/oracle/client.py
===================================================================
--- django/branches/multiple-db-support/django/db/backends/oracle/client.py
2006-07-21 17:11:13 UTC (rev 3411)
+++ django/branches/multiple-db-support/django/db/backends/oracle/client.py
2006-07-21 18:15:02 UTC (rev 3412)
@@ -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:
Modified:
django/branches/multiple-db-support/django/db/backends/postgresql/client.py
===================================================================
--- django/branches/multiple-db-support/django/db/backends/postgresql/client.py
2006-07-21 17:11:13 UTC (rev 3411)
+++ django/branches/multiple-db-support/django/db/backends/postgresql/client.py
2006-07-21 18:15:02 UTC (rev 3412)
@@ -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]
Modified:
django/branches/multiple-db-support/django/db/backends/sqlite3/client.py
===================================================================
--- django/branches/multiple-db-support/django/db/backends/sqlite3/client.py
2006-07-21 17:11:13 UTC (rev 3411)
+++ django/branches/multiple-db-support/django/db/backends/sqlite3/client.py
2006-07-21 18:15:02 UTC (rev 3412)
@@ -1,6 +1,5 @@
-from django.conf import settings
import os
-def runshell():
+def runshell(settings):
args = ['', settings.DATABASE_NAME]
os.execvp('sqlite3', args)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---