mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Made various negligible formatting cleanups to the database backends
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -11,7 +11,7 @@ try:
|
||||
import psycopg2.extensions
|
||||
except ImportError, e:
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured, "Error loading psycopg2 module: %s" % e
|
||||
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
|
||||
|
||||
DatabaseError = Database.DatabaseError
|
||||
IntegrityError = Database.IntegrityError
|
||||
@@ -47,7 +47,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
set_tz = True
|
||||
if settings.DATABASE_NAME == '':
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
raise ImproperlyConfigured, "You need to specify DATABASE_NAME in your Django settings file."
|
||||
raise ImproperlyConfigured("You need to specify DATABASE_NAME in your Django settings file.")
|
||||
conn_string = "dbname=%s" % settings.DATABASE_NAME
|
||||
if settings.DATABASE_USER:
|
||||
conn_string = "user=%s %s" % (settings.DATABASE_USER, conn_string)
|
||||
|
||||
Reference in New Issue
Block a user