summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/creation.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/postgresql/creation.py')
-rw-r--r--django/db/backends/postgresql/creation.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py
index be7f49482b..af26d0b78f 100644
--- a/django/db/backends/postgresql/creation.py
+++ b/django/db/backends/postgresql/creation.py
@@ -1,4 +1,3 @@
-from django.conf import settings
from django.db.backends.creation import BaseDatabaseCreation
class DatabaseCreation(BaseDatabaseCreation):
@@ -31,9 +30,9 @@ class DatabaseCreation(BaseDatabaseCreation):
}
def sql_table_creation_suffix(self):
- assert settings.TEST_DATABASE_COLLATION is None, "PostgreSQL does not support collation setting at database creation time."
- if settings.TEST_DATABASE_CHARSET:
- return "WITH ENCODING '%s'" % settings.TEST_DATABASE_CHARSET
+ assert self.connection.settings_dict['TEST_COLLATION'] is None, "PostgreSQL does not support collation setting at database creation time."
+ if self.connection.settings_dict['TEST_CHARSET']:
+ return "WITH ENCODING '%s'" % self.connection.settings_dict['TEST_CHARSET']
return ''
def sql_indexes_for_field(self, model, f, style):