You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an async version of django's [ContextMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-simple/#django.views.generic.base.ContextMixin)
64
-
the only difference is that the `get_context_data()` method is async.
some of the base classes for `DetailView` have been re-written as async:
32
32
33
-
#### AsyncSingleObjectMixin
34
-
35
-
like [SingleObjectMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-single-object/#django.views.generic.detail.SingleObjectMixin)
36
-
with these differences:
37
-
38
-
* inherits from [AsyncContextMixin](base.md#asynccontextmixin)
39
-
*`get_object()` method is async.
40
-
*`get_queryset()` method is async.
41
-
*`get_context_data()` method is async.
42
-
43
33
#### AsyncBaseDetailView
44
34
45
35
like [BaseDetailView](https://docs.djangoproject.com/en/5.1/ref/class-based-views/generic-display/#django.views.generic.detail.BaseDetailView) but `get()` is async and the ancestors are different.
some of the base classes for `ListView` have been re-written as async:
34
34
35
-
### AsyncMultipleObjectMixin
36
-
like [MultipleObjectMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-multiple-object/#django.views.generic.list.MultipleObjectMixin) but `get_queryset()`, `paginate_queryset()` and `get_context_data()` methods are async.
37
-
38
35
### AsyncBaseListView
39
36
like [BaseListView](https://docs.djangoproject.com/en/5.1/ref/class-based-views/generic-display/#django.views.generic.list.BaseListView) but `get()` method is async.
Copy file name to clipboardExpand all lines: docs/views/async-class-based-views/mixins-editing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ A form mixin that works on ModelForms, rather than a standalone form.
18
18
`AsyncModelFormMixin` similar to django's [ModelFormMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-editing/#modelformmixin)
19
19
with a number of differences:
20
20
21
-
1.`AsyncModelFormMixin` inherits from [AsyncFormMixin](mixins-editing.md#asyncformmixin) and [AsyncSingleObjectMixin](detail.md#asyncsingleobjectmixin) so anything mentioned on those classes also applies here.
21
+
1.`AsyncModelFormMixin` inherits from [AsyncFormMixin](mixins-editing.md#asyncformmixin) and [AsyncSingleObjectMixin](mixins-single-object.md#asyncsingleobjectmixin) so anything mentioned on those classes also applies here.
like [MultipleObjectMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-multiple-object/#django.views.generic.list.MultipleObjectMixin) but `get_queryset()`, `paginate_queryset()` and `get_context_data()` methods are async.
3
+
4
+
## AsyncMultipleObjectTemplateResponseMixin
5
+
like django's [AsyncMultipleObjectTemplateResponseMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-multiple-object/#multipleobjecttemplateresponsemixin)
6
+
but inherits from [AsyncTemplateResponseMixin](mixins-simple.md#asynctemplateresponsemixin)
an async version of django's [ContextMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-simple/#django.views.generic.base.ContextMixin)
3
+
the only difference is that the `get_context_data()` method is async.
4
+
5
+
6
+
## AsyncTemplateResponseMixin
7
+
an async version of django's [TemplateResponseMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-simple/#templateresponsemixin)
8
+
the `render_to_response` method has been turned async to make database connections possible.
like [SingleObjectMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-single-object/#django.views.generic.detail.SingleObjectMixin)
4
+
with these differences:
5
+
6
+
* inherits from [AsyncContextMixin](mixins-simple.md#asynccontextmixin)
7
+
*`get_object()` method is async.
8
+
*`get_queryset()` method is async.
9
+
*`get_context_data()` method is async.
10
+
11
+
## AsyncSingleObjectTemplateResponseMixin
12
+
13
+
like django's [SingleObjectTemplateResponseMixin](https://docs.djangoproject.com/en/5.1/ref/class-based-views/mixins-single-object/#singleobjecttemplateresponsemixin)
14
+
but inherits from [AsyncTemplateResponseMixin](mixins-simple.md#asynctemplateresponsemixin)
0 commit comments