Maintaining uniformity in documentation highlight

Highlighting `views.py file` for quicker and easier reference. Fixes #6965
This commit is contained in:
Karthik Hanasoge Suresh 2019-10-03 21:48:26 +02:00 committed by GitHub
parent 30e56f62ba
commit 481c7d50b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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