* `Model.asave()` to mirror `save()`
* `Model.adelete()` to mirror `delete()`
* `Model.arefresh_from_db()` to mirror `refresh_from_db()`
Allowing usage like:
{{{
book = await Book.objects.aget(title=title)
book.pages = ...
await book.asave()
}}}
There’s already a way to effectively call save for new objects only,
through the `QuerySet.acreate()` method, exposed on managers.
`Model` also has some database-touching methods used in form validation,
like `validate_constraints()`. But if we aren’t intending on exposing the
forms API as async, yet, then these could be deferred
--
Ticket URL: <https://code.djangoproject.com/ticket/34112>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.