From 8e059483b2d640853739d4d93ce0e5dd13f22015 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 9 Dec 2025 08:54:03 +0000 Subject: [PATCH] Update warning to use consistent syntax --- docs/api-guide/viewsets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/viewsets.md b/docs/api-guide/viewsets.md index 5550c3ced..bb42a097a 100644 --- a/docs/api-guide/viewsets.md +++ b/docs/api-guide/viewsets.md @@ -57,7 +57,7 @@ Typically we wouldn't do this, but would instead register the viewset with a rou router.register(r'users', UserViewSet, basename='user') urlpatterns = router.urls -> **Warning**: Do not use `.as_view()` with `@action` methods. It bypasses router setup and may ignore action settings like `permission_classes`. Use `DefaultRouter` for actions. +**Warning**: Do not use `.as_view()` with `@action` methods. It bypasses router setup and may ignore action settings like `permission_classes`. Use `DefaultRouter` for actions. Rather than writing your own viewsets, you'll often want to use the existing base classes that provide a default set of behavior. For example: