Browse Source

[desktop] ATOMIC_REQUESTS is a setting on the database config

Erick Tryzelaar 10 năm trước cách đây
mục cha
commit
198e250
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      desktop/core/src/desktop/settings.py

+ 3 - 4
desktop/core/src/desktop/settings.py

@@ -212,9 +212,6 @@ FILE_UPLOAD_HANDLERS = (
   'django.core.files.uploadhandler.TemporaryFileUploadHandler',
 )
 
-# Wrap each request in a transaction.
-ATOMIC_REQUESTS = True
-
 ############################################################
 # Part 4: Installation of apps
 ############################################################
@@ -294,7 +291,9 @@ else:
     "PORT" : str(desktop.conf.DATABASE.PORT.get()),
     "OPTIONS": force_dict_to_strings(desktop.conf.DATABASE.OPTIONS.get()),
     # DB used for tests
-    "TEST_NAME" : get_desktop_root('desktop-test.db')
+    "TEST_NAME" : get_desktop_root('desktop-test.db'),
+    # Wrap each request in a transaction.
+    "ATOMIC_REQUESTS" : True,
   }
 
 DATABASES = {