Skip to content

Commit 7122568

Browse files
committed
Add docs for new decorators
1 parent 96223eb commit 7122568

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/api-guide/views.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,13 @@ The available decorators are:
186186
* `@authentication_classes(...)`
187187
* `@throttle_classes(...)`
188188
* `@permission_classes(...)`
189+
* `@content_negotiation_class(...)`
190+
* `@metadata_class(...)`
191+
* `@versioning_class(...)`
189192

190-
Each of these decorators takes a single argument which must be a list or tuple of classes.
193+
Each of these decorators is equivalent to setting their respective [api policy attributes][api-policy-attributes].
194+
195+
All decorators take a single argument. The ones that end with `_class` expect a single class while the ones ending in `_classes` expect a list or tuple of classes.
191196

192197

193198
## View schema decorator
@@ -224,4 +229,5 @@ You may pass `None` in order to exclude the view from schema generation.
224229
[throttling]: throttling.md
225230
[schemas]: schemas.md
226231
[classy-drf]: http://www.cdrf.co
232+
[api-policy-attributes]: views.md#api-policy-attributes
227233

0 commit comments

Comments
 (0)