summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3/creation.py
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-07-06 23:25:30 +0000
committerRamiro Morales <cramm0@gmail.com>2011-07-06 23:25:30 +0000
commit569aa34ea5eec46ec0d899f4db682687964feec0 (patch)
tree01a2fef12d94e2b5187a5afd76fd1184026e28a7 /django/db/backends/sqlite3/creation.py
parent21e0b3a243791deef803dddcb9e15d0a3b59af96 (diff)
Fixed #16250 -- Made test database creation support code in the PostgreSQL DB backend compatible with psycopg2 2.4.2.
Implemented this by adding an internal hook for work that should be performed before that point. Also, regarding the `DatabaseCreation.set_autocommit()` method: * Stop using it for such tasks * Stop providing an implementation that tries to cover all the possible idioms a third party database backend DB-API 2 driver could need to activate autocommit. It is now left for third party backends to implement. This can be backwards incompatible in the case of user applications that: * Had started using this method * Use a third a party database backend git-svn-id: http://code.djangoproject.com/svn/django/trunk@16520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/sqlite3/creation.py')
-rw-r--r--django/db/backends/sqlite3/creation.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py
index f6fe6a4534..cd393561d1 100644
--- a/django/db/backends/sqlite3/creation.py
+++ b/django/db/backends/sqlite3/creation.py
@@ -69,3 +69,6 @@ class DatabaseCreation(BaseDatabaseCreation):
if test_database_name and test_database_name != ":memory:":
# Remove the SQLite database file
os.remove(test_database_name)
+
+ def set_autocommit(self):
+ self.connection.connection.isolation_level = None