Spaces:
Sleeping
Sleeping
Update chatbot_django/settings.py
Browse files- chatbot_django/settings.py +131 -130
chatbot_django/settings.py
CHANGED
|
@@ -1,130 +1,131 @@
|
|
| 1 |
-
"""
|
| 2 |
-
Django settings for chatbot_django project.
|
| 3 |
-
|
| 4 |
-
Generated by 'django-admin startproject' using Django 5.0.4.
|
| 5 |
-
|
| 6 |
-
For more information on this file, see
|
| 7 |
-
https://docs.djangoproject.com/en/5.0/topics/settings/
|
| 8 |
-
|
| 9 |
-
For the full list of settings and their values, see
|
| 10 |
-
https://docs.djangoproject.com/en/5.0/ref/settings/
|
| 11 |
-
"""
|
| 12 |
-
|
| 13 |
-
from pathlib import Path
|
| 14 |
-
|
| 15 |
-
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
| 16 |
-
BASE_DIR = Path(__file__).resolve().parent.parent
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
# Quick-start development settings - unsuitable for production
|
| 20 |
-
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
| 21 |
-
|
| 22 |
-
# SECURITY WARNING: keep the secret key used in production secret!
|
| 23 |
-
SECRET_KEY = 'django-insecure-l39x6jgx075p9bw8^px-c=pys%&$bzdo_sz_oabf#5bv@^isj9'
|
| 24 |
-
|
| 25 |
-
LOGIN_URL = '/users/login/'
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
# SECURITY WARNING: don't run with debug turned on in production!
|
| 29 |
-
DEBUG = True
|
| 30 |
-
|
| 31 |
-
ALLOWED_HOSTS = []
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
'
|
| 39 |
-
'django.contrib.
|
| 40 |
-
'django.contrib.
|
| 41 |
-
'django.contrib.
|
| 42 |
-
'django.contrib.
|
| 43 |
-
'django.contrib.
|
| 44 |
-
'
|
| 45 |
-
'
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
'django.
|
| 51 |
-
'django.middleware.
|
| 52 |
-
'django.middleware.
|
| 53 |
-
'django.
|
| 54 |
-
'django.contrib.
|
| 55 |
-
'django.middleware.
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
'
|
| 64 |
-
'
|
| 65 |
-
'
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
'django.template.context_processors.
|
| 69 |
-
'django.
|
| 70 |
-
'django.contrib.
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
#
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
'
|
| 87 |
-
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
#
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
#
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
#
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
#
|
| 129 |
-
|
| 130 |
-
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Django settings for chatbot_django project.
|
| 3 |
+
|
| 4 |
+
Generated by 'django-admin startproject' using Django 5.0.4.
|
| 5 |
+
|
| 6 |
+
For more information on this file, see
|
| 7 |
+
https://docs.djangoproject.com/en/5.0/topics/settings/
|
| 8 |
+
|
| 9 |
+
For the full list of settings and their values, see
|
| 10 |
+
https://docs.djangoproject.com/en/5.0/ref/settings/
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
+
from pathlib import Path
|
| 14 |
+
|
| 15 |
+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
| 16 |
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
# Quick-start development settings - unsuitable for production
|
| 20 |
+
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
| 21 |
+
|
| 22 |
+
# SECURITY WARNING: keep the secret key used in production secret!
|
| 23 |
+
SECRET_KEY = 'django-insecure-l39x6jgx075p9bw8^px-c=pys%&$bzdo_sz_oabf#5bv@^isj9'
|
| 24 |
+
|
| 25 |
+
LOGIN_URL = '/users/login/'
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# SECURITY WARNING: don't run with debug turned on in production!
|
| 29 |
+
DEBUG = True
|
| 30 |
+
|
| 31 |
+
ALLOWED_HOSTS = []
|
| 32 |
+
|
| 33 |
+
X_FRAME_OPTIONS = 'ALLOW-FROM https://huggingface.co/'
|
| 34 |
+
|
| 35 |
+
# Application definition
|
| 36 |
+
|
| 37 |
+
INSTALLED_APPS = [
|
| 38 |
+
'daphne',
|
| 39 |
+
'django.contrib.admin',
|
| 40 |
+
'django.contrib.auth',
|
| 41 |
+
'django.contrib.contenttypes',
|
| 42 |
+
'django.contrib.sessions',
|
| 43 |
+
'django.contrib.messages',
|
| 44 |
+
'django.contrib.staticfiles',
|
| 45 |
+
'chat',
|
| 46 |
+
'users'
|
| 47 |
+
]
|
| 48 |
+
|
| 49 |
+
MIDDLEWARE = [
|
| 50 |
+
'django.middleware.security.SecurityMiddleware',
|
| 51 |
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
| 52 |
+
'django.middleware.common.CommonMiddleware',
|
| 53 |
+
'django.middleware.csrf.CsrfViewMiddleware',
|
| 54 |
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
| 55 |
+
'django.contrib.messages.middleware.MessageMiddleware',
|
| 56 |
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
| 57 |
+
]
|
| 58 |
+
|
| 59 |
+
ROOT_URLCONF = 'chatbot_django.urls'
|
| 60 |
+
|
| 61 |
+
TEMPLATES = [
|
| 62 |
+
{
|
| 63 |
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
| 64 |
+
'DIRS': [],
|
| 65 |
+
'APP_DIRS': True,
|
| 66 |
+
'OPTIONS': {
|
| 67 |
+
'context_processors': [
|
| 68 |
+
'django.template.context_processors.debug',
|
| 69 |
+
'django.template.context_processors.request',
|
| 70 |
+
'django.contrib.auth.context_processors.auth',
|
| 71 |
+
'django.contrib.messages.context_processors.messages',
|
| 72 |
+
],
|
| 73 |
+
},
|
| 74 |
+
},
|
| 75 |
+
]
|
| 76 |
+
|
| 77 |
+
WSGI_APPLICATION = 'chatbot_django.wsgi.application'
|
| 78 |
+
ASGI_APPLICATION = 'chatbot_django.asgi.application'
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
# Database
|
| 82 |
+
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
|
| 83 |
+
|
| 84 |
+
DATABASES = {
|
| 85 |
+
'default': {
|
| 86 |
+
'ENGINE': 'django.db.backends.sqlite3',
|
| 87 |
+
'NAME': BASE_DIR / 'db.sqlite3',
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
# Password validation
|
| 93 |
+
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
|
| 94 |
+
|
| 95 |
+
AUTH_PASSWORD_VALIDATORS = [
|
| 96 |
+
{
|
| 97 |
+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
| 107 |
+
},
|
| 108 |
+
]
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
# Internationalization
|
| 112 |
+
# https://docs.djangoproject.com/en/5.0/topics/i18n/
|
| 113 |
+
|
| 114 |
+
LANGUAGE_CODE = 'en-us'
|
| 115 |
+
|
| 116 |
+
TIME_ZONE = 'UTC'
|
| 117 |
+
|
| 118 |
+
USE_I18N = True
|
| 119 |
+
|
| 120 |
+
USE_TZ = True
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
# Static files (CSS, JavaScript, Images)
|
| 124 |
+
# https://docs.djangoproject.com/en/5.0/howto/static-files/
|
| 125 |
+
|
| 126 |
+
STATIC_URL = 'static/'
|
| 127 |
+
|
| 128 |
+
# Default primary key field type
|
| 129 |
+
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
|
| 130 |
+
|
| 131 |
+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|