Skip to content

Instantly share code, notes, and snippets.

View highpost's full-sized avatar

Daniel Sears highpost

View GitHub Profile
@bpereto
bpereto / drf-rules-permission-class-with-httpmethod-map.py
Last active November 28, 2019 09:19
Django Restframework Rules Permission integration with HTTPMethod Map
"""
Django REST Framework Permission Class for Django Rules
"""
from rest_framework import permissions, exceptions
from rest_framework.viewsets import ModelViewSet
from django.http import Http404
class DjangoRulesMethodObjectPermissions(permissions.BasePermission):
"""