control one permission with same name for each page
This commit is contained in:
@@ -4,3 +4,12 @@
|
||||
you can check out the Django Rest Framework documentation at:
|
||||
https://www.django-rest-framework.org/api-guide/exceptions/#custom-exception-handling
|
||||
"""
|
||||
|
||||
from rest_framework.exceptions import APIException
|
||||
from rest_framework import status
|
||||
|
||||
|
||||
class ConflictException(APIException):
|
||||
status_code = status.HTTP_409_CONFLICT
|
||||
default_detail = "Object already exists."
|
||||
default_code = "conflict"
|
||||
|
||||
Reference in New Issue
Block a user