mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-09-16 01:02:29 +03:00
Add docs for new decorators
This commit is contained in:
parent
96223eb3b9
commit
712256829a
|
@ -186,8 +186,13 @@ The available decorators are:
|
|||
* `@authentication_classes(...)`
|
||||
* `@throttle_classes(...)`
|
||||
* `@permission_classes(...)`
|
||||
* `@content_negotiation_class(...)`
|
||||
* `@metadata_class(...)`
|
||||
* `@versioning_class(...)`
|
||||
|
||||
Each of these decorators takes a single argument which must be a list or tuple of classes.
|
||||
Each of these decorators is equivalent to setting their respective [api policy attributes][api-policy-attributes].
|
||||
|
||||
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.
|
||||
|
||||
|
||||
## View schema decorator
|
||||
|
@ -224,4 +229,5 @@ You may pass `None` in order to exclude the view from schema generation.
|
|||
[throttling]: throttling.md
|
||||
[schemas]: schemas.md
|
||||
[classy-drf]: http://www.cdrf.co
|
||||
[api-policy-attributes]: views.md#api-policy-attributes
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user