فهرست منبع

url and setting file change

VISHAL BHANUSHALI 3 ماه پیش
والد
کامیت
4eebf2a60c
2فایلهای تغییر یافته به همراه13 افزوده شده و 4 حذف شده
  1. 10 4
      content_quality_tool/settings.py
  2. 3 0
      content_quality_tool/urls.py

+ 10 - 4
content_quality_tool/settings.py

@@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-$6far8v=798or1wru24=zq&k*9&frm+dk%c!*w!a4wfb#z1_+3
 # SECURITY WARNING: don't run with debug turned on in production!
 MINIMAX_API_KEY = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJHcm91cE5hbWUiOiJBYmh5dWRheSBBbmR1Z3VsYSIsIlVzZXJOYW1lIjoiQWJoeXVkYXkgQW5kdWd1bGEiLCJBY2NvdW50IjoiIiwiU3ViamVjdElEIjoiMTk3NjIwMTUxODMxOTE0OTMxMyIsIlBob25lIjoiIiwiR3JvdXBJRCI6IjE5NzYyMDE1MTgzMTA3NTY3NzUiLCJQYWdlTmFtZSI6IiIsIk1haWwiOiJhYmh5dWRheWFuZHVndWxhMjEzQGdtYWlsLmNvbSIsIkNyZWF0ZVRpbWUiOiIyMDI1LTEwLTA5IDIxOjAyOjE0IiwiVG9rZW5UeXBlIjoxLCJpc3MiOiJtaW5pbWF4In0.Dw6ug5FCzz_E0MOoBQ4fNN-ksaCJrwfscP5_fpmL7nxhlPJraoDHDFiznoqd5skLtIOKgsLsMNJMcutXyKTBxqqaKVGgKesZ_0JU8bAPwuPqe0MJ7ko3sZ0i858lFIqi8vH2rfgwqvvu9np2a2pQh2zvD-7LAZG4xCwcMHY7_19037s5EgONPYP7Lc_5caiF4DmNR4u7U4cunFfwGEGydpNSBP2xlk_dCRblsRNZFp-l9IkXtgi9EGOCzophhJvP8YiTMVZ2vtitt4c7YACqxtAjXT9774p299CqHAuuHcEv3MXiv0f1Zp4ERkfbsjYawYIewlfPgyw3bmFdm1py_Q'
 DEBUG = True
-ALLOWED_HOSTS = ['*', '172.29.7.103']
+ALLOWED_HOSTS = ['*', '172.29.7.103','https://incubator.luminad.com']
 # Application definition
 INSTALLED_APPS = [
     'django.contrib.admin',
@@ -54,7 +54,7 @@ ROOT_URLCONF = 'content_quality_tool.urls'
 TEMPLATES = [
     {
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
-        'DIRS': [BASE_DIR / "templates", BASE_DIR/ 'content_quality_tool_public/templates', BASE_DIR/ 'video_generator/templates'],
+        'DIRS': [BASE_DIR / "templates", BASE_DIR/ 'content_quality_tool_public/templates', BASE_DIR/ 'video_generator/templates', BASE_DIR/ 'ca/templates'],
         'APP_DIRS': True,
         'OPTIONS': {
             'context_processors': [
@@ -101,7 +101,9 @@ USE_TZ = True
 STATIC_URL = 'static/'
 STATICFILES_DIRS = [
     os.path.join(BASE_DIR, "content_quality_tool_public/static"),
-    os.path.join(BASE_DIR, "video_generator/static")
+    os.path.join(BASE_DIR, "video_generator/static"),
+    os.path.join(BASE_DIR, "ca/static"),
+    os.path.join(BASE_DIR, "api/static")
 ]
 # Default primary key field type
 # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
@@ -136,6 +138,10 @@ GROQ_API_URL = "https://api.groq.com/openai/v1/chat/completions"
 SUPPORTED_MODELS = ["llama-3.1-8b-instant", "llama-3.3-70b-versatile", "mixtral-8x7b-32768"]
 MAX_BATCH_SIZE = 100  # Maximum products per batch request
 
+CSRF_TRUSTED_ORIGINS = [
+    'https://incubator.luminad.com/',
+    'https://incubator.luminad.com',
+]
 
 # ==================== settings.py ====================
 LOGGING = {
@@ -157,4 +163,4 @@ LOGGING = {
             'propagate': False,
         },
     },
-}
+}

+ 3 - 0
content_quality_tool/urls.py

@@ -19,6 +19,7 @@ from django.urls import path
 from django.urls import path, include
 from content_quality_tool_public import views as content_views
 from video_generator import views as video_views
+from ca import views as ca_views
 # from template import views
 
 urlpatterns = [
@@ -30,6 +31,8 @@ urlpatterns = [
     # api url
     path("core/", include("core.urls")),
     path("attr/", include("attr_extraction.urls")),
+    path('ca/', include('ca.urls')),
+    path('api/', include('api.urls')),
     # path("", views.login_view, name="login_view"),
 ]