mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Update docs/api-guide/permissions.md
@permission_classes takes a tuple or list.
This commit is contained in:
parent
3e3ede71d2
commit
3868241f6a
|
@ -53,7 +53,7 @@ You can also set the authentication policy on a per-view basis, using the `APIVi
|
|||
Or, if you're using the `@api_view` decorator with function based views.
|
||||
|
||||
@api_view('GET')
|
||||
@permission_classes(IsAuthenticated)
|
||||
@permission_classes((IsAuthenticated, ))
|
||||
def example_view(request, format=None):
|
||||
content = {
|
||||
'status': 'request was permitted'
|
||||
|
|
Loading…
Reference in New Issue
Block a user