diff options
author | Caio Ariede <caio.ariede@gmail.com> | 2015-08-05 11:08:56 -0300 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-08-07 09:33:17 -0400 |
commit | ec9004728ee136e3b7e2b7cd2610203e16b6ce9b (patch) | |
tree | bd3fd3d8c729e5e01fc3111696a7d4eaa56d85b0 /django/db/backends/postgresql/creation.py | |
parent | 8656cfc4e01332426e5e4b78c20a4e9ec443b293 (diff) | |
download | django-ec9004728ee136e3b7e2b7cd2610203e16b6ce9b.tar.gz |
Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql.
Diffstat (limited to 'django/db/backends/postgresql/creation.py')
-rw-r--r-- | django/db/backends/postgresql/creation.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py new file mode 100644 index 0000000000..13eea0d3b7 --- /dev/null +++ b/django/db/backends/postgresql/creation.py @@ -0,0 +1,13 @@ +from django.db.backends.base.creation import BaseDatabaseCreation + + +class DatabaseCreation(BaseDatabaseCreation): + + def sql_table_creation_suffix(self): + test_settings = self.connection.settings_dict['TEST'] + assert test_settings['COLLATION'] is None, ( + "PostgreSQL does not support collation setting at database creation time." + ) + if test_settings['CHARSET']: + return "WITH ENCODING '%s'" % test_settings['CHARSET'] + return '' |