This commit is contained in:
behruz-dev
2025-07-30 09:49:00 +05:00
parent 6bc284f1ec
commit 86d4b61f1b
2 changed files with 13 additions and 1 deletions

View File

@@ -46,6 +46,7 @@ PACKAGES = [
'rest_framework', 'rest_framework',
'rest_framework_simplejwt', 'rest_framework_simplejwt',
'cacheops', 'cacheops',
'corsheaders',
] ]
INSTALLED_APPS = [] INSTALLED_APPS = []
@@ -58,6 +59,7 @@ INSTALLED_APPS += APPS
MIDDLEWARE = [ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
@@ -151,4 +153,13 @@ from config.conf.rest_framework import *
from config.conf.simplejwt import * from config.conf.simplejwt import *
from config.conf.celery import * from config.conf.celery import *
from config.conf.redis import * from config.conf.redis import *
# from config.conf.unfold import * # from config.conf.unfold import *
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
]
CSRF_TRUSTED_ORIGINS = [
"http://trustme.felixits.uz"
]

View File

@@ -15,3 +15,4 @@ pytest-django
django-cacheops==7.2 django-cacheops==7.2
django-unfold==0.62.0 django-unfold==0.62.0
drf_yasg==1.21.10 drf_yasg==1.21.10
django-cors-headers==4.7.0