Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed the django.contrib.gis test database creation as well.

Refs r10026 and r10027.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 0543f33bbcc48e7dd8d977b77b0377c1928fcacb 1 parent 6c6edb9
@malcolmt malcolmt authored
View
5 django/contrib/gis/db/backend/postgis/creation.py
@@ -140,7 +140,10 @@ def create_spatial_db(test=False, verbosity=1, autoclobber=False, interactive=Fa
# Closing the connection
connection.close()
settings.DATABASE_NAME = db_name
- settings.DATABASE_SUPPORTS_TRANSACTIONS = connection.creation._rollback_works()
+ connection.settings_dict["DATABASE_NAME"] = db_name
+ can_rollback = connection.creation._rollback_works()
+ settings.DATABASE_SUPPORTS_TRANSACTIONS = can_rollback
+ connection.settings_dict["DATABASE_SUPPORTS_TRANSACTIONS"] = can_rollback
# Syncing the database
call_command('syncdb', verbosity=verbosity, interactive=interactive)
View
5 django/db/backends/creation.py
@@ -322,8 +322,9 @@ def create_test_db(self, verbosity=1, autoclobber=False):
self.connection.close()
settings.DATABASE_NAME = test_database_name
self.connection.settings_dict["DATABASE_NAME"] = test_database_name
- settings.DATABASE_SUPPORTS_TRANSACTIONS = self._rollback_works()
- self.connection.settings_dict["DATABASE_SUPPORTS_TRANSACTIONS"] = self._rollback_works()
+ can_rollback = self._rollback_works()
+ settings.DATABASE_SUPPORTS_TRANSACTIONS = can_rollback
+ self.connection.settings_dict["DATABASE_SUPPORTS_TRANSACTIONS"] = can_rollback
call_command('syncdb', verbosity=verbosity, interactive=False)
Please sign in to comment.
Something went wrong with that request. Please try again.