From 053eabf6958112009f074a071102b87d9baa81de Mon Sep 17 00:00:00 2001 From: Enrico Massa Date: Mon, 5 Sep 2022 01:16:16 +0800 Subject: [PATCH] Update docs/api-guide/views.md Co-authored-by: Paolo Melchiorre --- docs/api-guide/views.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md index 9e34191f3..07f775f71 100644 --- a/docs/api-guide/views.md +++ b/docs/api-guide/views.md @@ -225,13 +225,13 @@ For class based views, all handler methods must be async, otherwise Django will For example: - class ListUsers(APIView): + class AsyncView(APIView): async def get(self, request): return Response({"message": "This is an async class based view."}) @api_view(['GET']) - async def view(request): + async def async_view(request): return Response({"message": "This is an async function based view."}) [cite]: https://reinout.vanrees.org/weblog/2011/08/24/class-based-views-usage.html