1
0
mirror of https://github.com/django/django.git synced 2024-12-27 11:35:53 +00:00
Commit Graph

94 Commits

Author SHA1 Message Date
Mariusz Felisiak
1f9d00ef9f [4.2.x] Added missing backticks in docs.
Backport of 02376f1f53 from main
2023-07-21 12:55:10 +02:00
django-bot
62510f01e7 [4.2.x] Fixed #34140 -- Reformatted code blocks in docs with blacken-docs. 2023-03-01 13:39:03 +01:00
Daniele Varrazzo
09ffc5c121 Fixed #33308 -- Added support for psycopg version 3.
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews.

Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-15 06:17:57 +01:00
Adam Johnson
444b6da7cc Refs #33939 -- Improved transaction.on_commit() docs. 2022-11-04 12:20:25 +01:00
SirAbhi13
4a1150b41d Fixed #33616 -- Allowed registering callbacks that can fail in transaction.on_commit().
Thanks David Wobrock and Mariusz Felisiak for reviews.
2022-09-06 12:21:36 +02:00
Alex Morega
7e6b537f5b
Fixed #33939 -- Used functools.partial() in transaction.on_commit() examples. 2022-08-23 11:55:30 +02:00
David
1c2bf80acb Changed "ie." to "i.e." in docs. 2022-04-28 10:37:06 +02:00
Krzysztof Jagiello
8d9827c06c Fixed #33161 -- Enabled durability check for nested atomic blocks in TestCase.
Co-Authored-By: Adam Johnson <me@adamj.eu>
2021-11-12 13:05:56 +01:00
Mariusz Felisiak
97237ad3fe Removed versionadded/changed annotations for 3.2. 2021-09-20 21:23:01 +02:00
Nick Pope
7c4ee487c7 Refs #32720 -- Fixed some broken links in docs. 2021-05-17 09:22:17 +02:00
Ian Foote
3828879eee Fixed #32220 -- Added durable argument to transaction.atomic(). 2020-11-27 21:43:15 +01:00
Adam Johnson
e906ff6fca Fixed #30457 -- Added TestCase.captureOnCommitCallbacks(). 2020-07-13 11:56:46 +02:00
David Smith
06c8565a46
Updated link to Celery. 2020-06-02 14:37:16 +02:00
Nick Pope
a9337b4add Used :pep: role in various docs. 2020-05-13 09:14:04 +02:00
Adam Johnson
d17b380653 Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments. 2020-05-04 12:10:47 +02:00
Simon Charette
fa5e7e46d8 Fixed #31423 -- Clarified nested atomic() example. 2020-04-04 20:39:33 +02:00
Jon Dufresne
958977f662 Fixed #31212 -- Updated psycopg links to HTTPS and new location. 2020-01-29 06:25:40 +01:00
Tobias Kunze
4a954cfd11 Fixed #30573 -- Rephrased documentation to avoid words that minimise the involved difficulty.
This patch does not remove all occurrences of the words in question.
Rather, I went through all of the occurrences of the words listed
below, and judged if they a) suggested the reader had some kind of
knowledge/experience, and b) if they added anything of value (including
tone of voice, etc). I left most of the words alone. I looked at the
following words:

- simply/simple
- easy/easier/easiest
- obvious
- just
- merely
- straightforward
- ridiculous

Thanks to Carlton Gibson for guidance on how to approach this issue, and
to Tim Bell for providing the idea. But the enormous lion's share of
thanks go to Adam Johnson for his patient and helpful review.
2019-09-06 13:27:46 +02:00
Tim Graham
27193aea00 Fixed #28584 -- Dropped support for SQLite < 3.7.15. 2017-10-03 10:42:18 -04:00
Jonatas CD
c9b22707b0 Fixed #28479 -- Doc'd that transaction rollback doesn't revert model state. 2017-09-04 15:43:29 -04:00
Tim Graham
259875535b Removed unneeded right quotes in docs to fix spelling errors.
A regression in pyenchant caused a problem:
https://github.com/rfk/pyenchant/issues/93
2017-07-18 08:24:49 -04:00
Tim Graham
9819676676 Updated links to the current version of MySQL docs. 2016-09-30 09:14:17 -04:00
Tim Graham
46a38307c2 Removed versionadded/changed annotations for 1.9. 2016-05-20 11:44:29 -04:00
Tim Graham
98839e9066 Removed British/Austrialian word: whilist. 2015-12-31 14:29:52 -05:00
Jon Dufresne
7aabd62380 Fixed #25778 -- Updated docs links to use https when available. 2015-12-01 08:01:34 -05:00
Tim Graham
54848a96dd Removed versionadded/changed annotations for 1.8. 2015-09-23 19:31:11 -04:00
Aymeric Augustin
91e9f1c972 Fixed #24921 -- set_autocommit(False) + ORM queries.
This commits lifts the restriction that the outermost atomic block must
be declared with savepoint=False. This restriction was overly cautious.

The logic that makes it safe not to create savepoints for inner blocks
also applies to the outermost block when autocommit is disabled and a
transaction is already active.

This makes it possible to use the ORM after set_autocommit(False).
Previously it didn't work because ORM write operations are protected
with atomic(savepoint=False).
2015-09-21 22:21:53 +02:00
Tim Graham
ea47a052ba Fixed #25311 -- Removed vague language about "partial commits" from docs. 2015-08-25 20:23:43 -04:00
Claude Paroz
64982cc2fb Updated Wikipedia links to use https 2015-08-08 12:02:32 +02:00
Andreas Pelme
00a1d4d042 Fixed #21803 -- Added support for post-commit callbacks
Made it possible to register and run callbacks after a database
transaction is committed with the `transaction.on_commit()` function.

This patch is heavily based on Carl Meyers django-transaction-hooks
<https://django-transaction-hooks.readthedocs.org/>. Thanks to
Aymeric Augustin, Carl Meyer, and Tim Graham for review and feedback.
2015-06-30 14:51:00 -04:00
Tim Graham
6b8c969878 Removed docs for removed transaction APIs. 2015-04-14 13:52:45 -04:00
David Cramer
27f68f8659 Correct scoping of savepoint example 2014-12-20 12:02:26 -08:00
Claude Paroz
0a4b04fc23 Used https for most *.python.org links 2014-12-19 18:07:52 +01:00
Corey Farwell
4db75925be Fixed typo in docs/topics/db/transactions.txt. 2014-09-03 11:49:00 -04:00
Tim Graham
fb4f3e04b1 Updated MySQL links to version 5.6. 2014-08-02 10:27:01 -04:00
Haris Ibrahim K. V
f2a8e47cfd Fixed typo in transactions.txt 2014-05-13 07:27:33 -04:00
Shai Berger
f095356ba2 Fixed #22343 -- Disallowed select_for_update in autocommit mode
The ticket was originally about two failing tests, which are
fixed by putting their queries in transactions.

Thanks Tim Graham for the report, Aymeric Augustin for the fix,
and Simon Charette, Tim Graham & Loïc Bistuer for review.
2014-04-10 03:04:51 +03:00
Tim Graham
51c8045145 Removed versionadded/changed annotations for 1.6. 2014-03-24 11:42:56 -04:00
Szczepan Cieślik
e816198034 Fixed docs typos. 2014-02-25 10:28:32 -05:00
Aymeric Augustin
8e1fc03491 Fixed typo. Refs #21836. 2014-01-26 09:30:10 +01:00
Chris Jerdonek
798fd59fad Fixed #21836 -- Improved transaction docs about autocommit mode
Clarified that queries in autocommit mode are committed immediately
only if a transaction has not already been started. Added to the
main transaction docs that Django's TestCase class implicitly wraps
its tests in transactions.
2014-01-25 21:20:17 +01:00
Aymeric Augustin
728548e483 Fixed #21134 -- Prevented queries in broken transactions.
Squashed commit of the following:

commit 63ddb271a44df389b2c302e421fc17b7f0529755
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 29 22:51:00 2013 +0200

    Clarified interactions between atomic and exceptions.

commit 2899ec299228217c876ba3aa4024e523a41c8504
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:45:32 2013 +0200

    Fixed TransactionManagementError in tests.

    Previous commit introduced an additional check to prevent running
    queries in transactions that will be rolled back, which triggered a few
    failures in the tests. In practice using transaction.atomic instead of
    the low-level savepoint APIs was enough to fix the problems.

commit 4a639b059ea80aeb78f7f160a7d4b9f609b9c238
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Sep 24 22:24:17 2013 +0200

    Allowed nesting constraint_checks_disabled inside atomic.

    Since MySQL handles transactions loosely, this isn't a problem.

commit 2a4ab1cb6e83391ff7e25d08479e230ca564bfef
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Sep 21 18:43:12 2013 +0200

    Prevented running queries in transactions that will be rolled back.

    This avoids a counter-intuitive behavior in an edge case on databases
    with non-atomic transaction semantics.

    It prevents using savepoint_rollback() inside an atomic block without
    calling set_rollback(False) first, which is backwards-incompatible in
    tests.

    Refs #21134.

commit 8e3db393853c7ac64a445b66e57f3620a3fde7b0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sun Sep 22 22:14:17 2013 +0200

    Replaced manual savepoints by atomic blocks.

    This ensures the rollback flag is handled consistently in internal APIs.
2013-09-30 09:42:27 +02:00
Aymeric Augustin
4db2752e28 Clarified why one must not catch database errors inside atomic. 2013-09-20 21:56:35 +02:00
Julien Phalip
47c755327b Fixed a number of minor misspellings. 2013-07-27 18:46:03 -07:00
Aymeric Augustin
c1284c3d3c Fixed #20571 -- Added an API to control connection.needs_rollback.
This is useful:
- to force a rollback on the exit of an atomic block without having to
  raise and catch an exception;
- to prevent a rollback after handling an exception manually.
2013-06-27 22:19:54 +02:00
yishaibeeri
f077f89198 Patch for ticket #20506 - documentation type 2013-05-27 11:14:38 +03:00
Aymeric Augustin
6633eeb886 Changed API to disable ATOMIC_REQUESTS per view.
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.

Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02:00
Marc Tamlyn
9666874ee1 Tidy up some of the transaction documentation. 2013-05-17 18:40:50 +02:00
Ana Krivokapic
cee96b87c0 Fix two typos in database transactions docs 2013-04-30 18:38:59 +02:00
Juan Catalano
78c842a323 Adapted uses of versionchanged/versionadded to the new form.
Refs #20104.
2013-04-20 17:18:35 +02:00