summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/async.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/topics/async.txt b/docs/topics/async.txt
index 9e2785c351..2b9b1a85d9 100644
--- a/docs/topics/async.txt
+++ b/docs/topics/async.txt
@@ -91,10 +91,20 @@ Detailed notes can be found in :ref:`async-queries`, but in short:
* ``async for`` is supported on all QuerySets (including the output of
``values()`` and ``values_list()``.)
+Django also supports some asynchronous model methods that use the database::
+
+ async def make_book(...):
+ book = Book(...)
+ await book.asave(using="secondary")
+
Transactions do not yet work in async mode. If you have a piece of code that
needs transactions behavior, we recommend you write that piece as a single
synchronous function and call it using :func:`sync_to_async`.
+.. versionchanged:: 4.2
+
+ Asynchronous model interface was added.
+
Performance
-----------