Django Rest Framework Authentication Class for not authorized users
Some DRF views should not be accessible by logged in users. In such cases we need permission class that will not allow authorized users to access the resource or action.
Installation
pip install drf_is_not_authenticated_class
Use cases
- Only not registered users should be able to create new user
from drf_is_not_authenticated_class import IsNotAuthenticated
class RegisterUser(CreateAPIView):
queryset = User.objects.all()
permission_classes = (IsNotAuthenticated,)
Contribution
Release files for drf-is-not-authenticated-class 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drf_is_not_authenticated_class-1.0.0.win32.zip | 9.2 kB | Details |
Release files / drf_is_not_authenticated_class-1.0.0.win32.zip
| Download URL | drf_is_not_authenticated_class-1.0.0.win32.zip |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6384191d297a9f29d2dc64d588de870a26f8588f0186c677b5369f617bc5cca0
|
|
BLAKE2b-256 checksum How to use checksums |
780886bee5752d6c5bca635f85e479620ee02af05dc63181c15e80917491a5aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|