Добавление custom_exception_handler

This commit is contained in:
2026-07-18 22:44:06 +03:00
parent 7f87794fcc
commit a8d36b59b4
6 changed files with 93 additions and 4 deletions

View File

@@ -37,10 +37,10 @@ REST_FRAMEWORK = {
'djangorestframework_camel_case.parser.CamelCaseJSONParser',
),
'DEFAULT_AUTHENTICATION_CLASSES': [
'net.xeaf.rack.utils.auth.ExpiringTokenAuthentication',
'net.xeaf.rack.utils.drf.ExpiringTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 10,
# 'EXCEPTION_HANDLER': 'tantal.bdrive.api.utils.custom_exception_handler'
'EXCEPTION_HANDLER': 'net.xeaf.rack.utils.drf.custom_exception_handler'
}