add features to products and fix cors settings

This commit is contained in:
nabijonovdavronbek619@gmail.com
2025-12-23 16:37:47 +05:00
parent 308365630d
commit b7be378f0a
3 changed files with 286 additions and 3 deletions

View File

@@ -43,11 +43,13 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'corsheaders',
'rest_framework',
'content',
]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
@@ -57,6 +59,16 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
# Faqat malum domenlarga ruxsat
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000", # Next.js dev server
"https://firma-plum.vercel.app", # production frontend
"https://serenmebel.uz",
"https://www.serenmebel.uz",
"https://www.maxdi.uz",
"https://maxdi.uz",
]
ROOT_URLCONF = 'portfolio_admin.urls'
TEMPLATES = [