I forgot this one :p

see #365
This commit is contained in:
Antoine Nguyen
2013-01-26 16:18:29 +01:00
parent e5df3d81ad
commit 6a85515638
+2 -2
View File
@@ -20,7 +20,7 @@ def db_table_exists(table, cursor=None):
else:
return table in table_names
def db_type():
def db_type(connection="default"):
"""Return the type of the *default* database
Supported values : 'postgres', 'mysql', 'sqlite'
@@ -28,6 +28,6 @@ def db_type():
:return: a string or None
"""
for t in ['postgres', 'mysql', 'sqlite']:
if settings.DATABASES['default']['ENGINE'].find(t) != -1:
if settings.DATABASES[connection]['ENGINE'].find(t) != -1:
return t
return None