Django Rest Framework custom permissions classes
Project description
drf-permissions
Installation
pip install drf-custom-permissions
Usage
APIView IsNotAuthenticated permission
# views.py
from rest_framework.views import APIView
from drf_custom_permissions import IsNotAuthenticated
class ExampleIsNotAuthenticatedAPIVIew(APIView):
permission_classes = (IsNotAuthenticated,)
...
APIView with HasGroupPermission
# views.py
from rest_framework.views import APIView
from drf_custom_permissions import HasGroupPermission
class ExampleIsNotAuthenticatedAPIVIew(APIView):
permission_classes = (HasGroupPermission,)
permission_groups = ('Designers', 'Developers',)
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for drf_custom_permissions-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fa19496a9841f134d9c60017a960b9e79b37ef9a63c644914add384fb7a69a1 |
|
MD5 | 347c22e9f10a56565a275888b3a90385 |
|
BLAKE2b-256 | 5fb6d21da0ef7309507029d12e42db2f21b7711a2c0f73b2f55927c3097aa5d8 |
Close
Hashes for drf_custom_permissions-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9193d0157e5ffb1808dd64767d74fd0b65e1267357055a8e7c8c3bf3fec9510b |
|
MD5 | d5fd1e488b27afd07ee58110461e1f4c |
|
BLAKE2b-256 | 1970f5f63ee027a8d12d12a4cbea1371c8bd5f1a6d008e8e10548cb76319583c |