From 0263c8d68c51a6960bd8a9f4c330aa7dabc9cecd Mon Sep 17 00:00:00 2001 From: Slava Nabatchikov Date: Mon, 13 Jul 2026 12:23:51 +0300 Subject: [PATCH] Remove DRF session authentication for debug mode --- {{ cookiecutter.name }}/src/app/conf/api.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/{{ cookiecutter.name }}/src/app/conf/api.py b/{{ cookiecutter.name }}/src/app/conf/api.py index dd94c88b..f83e9f26 100644 --- a/{{ cookiecutter.name }}/src/app/conf/api.py +++ b/{{ cookiecutter.name }}/src/app/conf/api.py @@ -32,11 +32,6 @@ "EXCEPTION_HANDLER": "app.exceptions.app_service_exception_handler", } -# Adding session auth and browsable API at the developer machine -if env("DEBUG", cast=bool, default=False): - REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].append("rest_framework.authentication.SessionAuthentication") - REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"].append("djangorestframework_camel_case.render.CamelCaseBrowsableAPIRenderer") - # Set up drf_spectacular, https://drf-spectacular.readthedocs.io/en/latest/settings.html SPECTACULAR_SETTINGS = {