mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
Maintaining uniformity in documentation highlight
Highlighting `views.py file` for quicker and easier reference. Fixes #6965
This commit is contained in:
parent
30e56f62ba
commit
481c7d50b7
|
@ -121,7 +121,7 @@ Now that code snippets are associated with users, we want to make sure that only
|
||||||
|
|
||||||
REST framework includes a number of permission classes that we can use to restrict who can access a given view. In this case the one we're looking for is `IsAuthenticatedOrReadOnly`, which will ensure that authenticated requests get read-write access, and unauthenticated requests get read-only access.
|
REST framework includes a number of permission classes that we can use to restrict who can access a given view. In this case the one we're looking for is `IsAuthenticatedOrReadOnly`, which will ensure that authenticated requests get read-write access, and unauthenticated requests get read-only access.
|
||||||
|
|
||||||
First add the following import in the views module
|
First add the following import in the `views.py` file
|
||||||
|
|
||||||
from rest_framework import permissions
|
from rest_framework import permissions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user