from async_drf.mixins import AsyncMixin, AsyncListModelMixin
from async_drf.viewsets import AsyncGenericViewSet
class ProductsViewSet(AsyncMixin, AsyncGenericViewSet, AsyncListModelMixin):
serializer_class = ProductsSerializer
queryset = ProductModel.objects.prefetch_related().all()
async def list(self, request: Request, *args, **kwargs):
# do async stuff here
return Response(data=data)
-
Notifications
You must be signed in to change notification settings - Fork 0
Async views and viewsets for DRF
License
yeesolve/async_drf
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
Async views and viewsets for DRF
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published