diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py
a
|
b
|
|
398 | 398 | |
399 | 399 | # Do you want to manage transactions manually? |
400 | 400 | # Hint: you really don't! |
401 | | TRANSACTIONS_MANAGED = False |
| 401 | DISABLE_TRANSACTION_MANAGEMENT = False |
402 | 402 | |
403 | 403 | # The User-Agent string to use when checking for URL validity through the |
404 | 404 | # isExistingURL validator. |
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
a
|
b
|
|
92 | 92 | if self.transaction_state: |
93 | 93 | self.transaction_state.append(self.transaction_state[-1]) |
94 | 94 | else: |
95 | | self.transaction_state.append(settings.TRANSACTIONS_MANAGED) |
| 95 | if hasattr(settings, 'TRANSACTIONS_MANAGED'): |
| 96 | warnings.warn( |
| 97 | 'The `TRANSACTIONS_MANAGED` setting is deprecated. ' |
| 98 | 'Please update your code to use DISABLE_TRANSACTION_MANAGEMENT.', |
| 99 | PendingDeprecationWarning |
| 100 | ) |
| 101 | self.transaction_state.append(settings.TRANSACTIONS_MANAGED) |
| 102 | else: |
| 103 | self.transaction_state.append(settings.DISABLE_TRANSACTION_MANAGEMENT) |
96 | 104 | |
97 | 105 | if self._dirty is None: |
98 | 106 | self._dirty = False |
… |
… |
|
156 | 164 | """ |
157 | 165 | if self.transaction_state: |
158 | 166 | return self.transaction_state[-1] |
159 | | return settings.TRANSACTIONS_MANAGED |
| 167 | if hasattr(settings, 'TRANSACTIONS_MANAGED'): |
| 168 | warnings.warn( |
| 169 | 'The `TRANSACTIONS_MANAGED` setting is deprecated. ' |
| 170 | 'Please update your code to use DISABLE_TRANSACTION_MANAGEMENT.', |
| 171 | PendingDeprecationWarning |
| 172 | ) |
| 173 | return settings.TRANSACTIONS_MANAGED |
| 174 | return settings.DISABLE_TRANSACTION_MANAGEMENT |
160 | 175 | |
161 | 176 | def managed(self, flag=True): |
162 | 177 | """ |
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
a
|
b
|
|
220 | 220 | was deprecated since Django 1.4 and will be removed in favor of the |
221 | 221 | generic static files handling. |
222 | 222 | |
| 223 | * The :setting:`TRANSACTIONS_MANAGED` setting has been deprecated |
| 224 | since Django 1.4 and will be ignored. It has been replaced by |
| 225 | :setting:`DISABLE_TRANSACTION_MANAGEMENT`. |
| 226 | |
223 | 227 | * 2.0 |
224 | 228 | * ``django.views.defaults.shortcut()``. This function has been moved |
225 | 229 | to ``django.contrib.contenttypes.views.shortcut()`` as part of the |
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
a
|
b
|
|
809 | 809 | Default tablespace to use for models that don't specify one, if the |
810 | 810 | backend supports it. |
811 | 811 | |
812 | | .. setting:: DISALLOWED_USER_AGENTS |
| 812 | .. setting:: DISABLE_TRANSACTION_MANAGEMENT |
| 813 | |
| 814 | DISABLE_TRANSACTION_MANAGEMENT |
| 815 | ------------------------------ |
| 816 | |
| 817 | .. versionadded:: 1.4 |
| 818 | |
| 819 | Default: ``False`` |
| 820 | |
| 821 | This is a setting whose value is seldomly changed. |
| 822 | |
| 823 | If you set it to ``True``, Django won't provide any automatic transaction |
| 824 | management. See :ref:`deactivating-db-transaction-management` for more details. |
| 825 | |
| 826 | Before Django 1.4 the name of this setting was ``TRANSACTIONS_MANAGED``. |
813 | 827 | |
814 | 828 | DISALLOWED_USER_AGENTS |
815 | 829 | ---------------------- |
… |
… |
|
2148 | 2162 | .. deprecated:: 1.2 |
2149 | 2163 | This setting has been replaced by :setting:`TEST_NAME` in |
2150 | 2164 | :setting:`DATABASES`. |
| 2165 | |
| 2166 | .. setting:: TRANSACTIONS_MANAGED |
| 2167 | |
| 2168 | TRANSACTIONS_MANAGED |
| 2169 | -------------------- |
| 2170 | |
| 2171 | .. deprecated:: 1.4 |
| 2172 | This setting has been replaced by :setting:`DISABLE_TRANSACTION_MANAGEMENT`. |
diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt
a
|
b
|
|
489 | 489 | |
490 | 490 | The existence of any ``'filters'`` key under the ``'mail_admins'`` handler will |
491 | 491 | disable this backward-compatibility shim and deprecation warning. |
| 492 | |
| 493 | ``TRANSACTIONS_MANAGED`` setting |
| 494 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 495 | |
| 496 | This setting has been replaced by the :setting:`DISABLE_TRANSACTION_MANAGEMENT` |
| 497 | setting. Both settings have the same default values and semantics. |
| 498 | |
diff --git a/docs/topics/db/transactions.txt b/docs/topics/db/transactions.txt
a
|
b
|
|
204 | 204 | if your transaction only reads from the database, the transaction must |
205 | 205 | be committed or rolled back before you complete a request. |
206 | 206 | |
| 207 | .. _deactivating-db-transaction-management: |
| 208 | |
207 | 209 | How to globally deactivate transaction management |
208 | 210 | ================================================= |
209 | 211 | |
210 | 212 | Control freaks can totally disable all transaction management by setting |
211 | | ``DISABLE_TRANSACTION_MANAGEMENT`` to ``True`` in the Django settings file. |
| 213 | :setting:`DISABLE_TRANSACTION_MANAGEMENT` to ``True`` in the Django settings |
| 214 | file. |
212 | 215 | |
213 | 216 | If you do this, Django won't provide any automatic transaction management |
214 | 217 | whatsoever. Middleware will no longer implicitly commit transactions, and |