control one permission with same name for each page

This commit is contained in:
2025-06-08 14:58:19 +03:30
parent 3e2375582c
commit 7cd3f992ae
4 changed files with 39 additions and 1 deletions

View File

@@ -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"