Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drf_custom_permissions-0.1.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drf_custom_permissions-0.1.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file drf_custom_permissions-0.1.2.tar.gz.

File metadata

  • Download URL: drf_custom_permissions-0.1.2.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Darwin/23.1.0

File hashes

Hashes for drf_custom_permissions-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6fa19496a9841f134d9c60017a960b9e79b37ef9a63c644914add384fb7a69a1
MD5 347c22e9f10a56565a275888b3a90385
BLAKE2b-256 5fb6d21da0ef7309507029d12e42db2f21b7711a2c0f73b2f55927c3097aa5d8

See more details on using hashes here.

File details

Details for the file drf_custom_permissions-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for drf_custom_permissions-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9193d0157e5ffb1808dd64767d74fd0b65e1267357055a8e7c8c3bf3fec9510b
MD5 d5fd1e488b27afd07ee58110461e1f4c
BLAKE2b-256 1970f5f63ee027a8d12d12a4cbea1371c8bd5f1a6d008e8e10548cb76319583c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page