diff --git a/app/app/settings.py b/app/app/settings.py index d0ae5905d..ba4e530fa 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -99,9 +99,11 @@ # SESSION_COOKIE_SECURE = True # USE_X_FORWARDED_HOST = True # ToDo: https://docs.djangoproject.com/en/dev/ref/settings/#use-x-forwarded-host + INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', + 'corsheaders', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', @@ -124,10 +126,11 @@ ] MIDDLEWARE = [ + 'corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', + 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', @@ -263,10 +266,8 @@ 'rest_framework.filters.SearchFilter', 'rest_framework_json_api.django_filters.DjangoFilterBackend', 'rest_framework_json_api.filters.OrderingFilter', - 'rest_framework_json_api.django_filters.DjangoFilterBackend', - 'rest_framework.filters.SearchFilter', ), - 'SEARCH_PARAM': 'filter[search]', + # 'SEARCH_PARAM': 'filter[search]', # 'TEST_REQUEST_RENDERER_CLASSES': ( # 'rest_framework_json_api.renderers.JSONRenderer', # ), diff --git a/requirements.txt b/requirements.txt index 1c90bf1cb..cb46e7a18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,7 @@ + Django==5.1.2 +django-cors-headers==4.4.0 + django-debug-toolbar==4.3.0 social-auth-app-django==5.4.1