Spaces:
Sleeping
Sleeping
thejagstudio
commited on
Commit
•
9b9f897
1
Parent(s):
36c062e
Update cloudStorage/settings.py
Browse files- cloudStorage/settings.py +146 -145
cloudStorage/settings.py
CHANGED
@@ -1,145 +1,146 @@
|
|
1 |
-
"""
|
2 |
-
Django settings for cloudStorage project.
|
3 |
-
|
4 |
-
Generated by 'django-admin startproject' using Django 4.0.4.
|
5 |
-
|
6 |
-
For more information on this file, see
|
7 |
-
https://docs.djangoproject.com/en/4.0/topics/settings/
|
8 |
-
|
9 |
-
For the full list of settings and their values, see
|
10 |
-
https://docs.djangoproject.com/en/4.0/ref/settings/
|
11 |
-
"""
|
12 |
-
|
13 |
-
from pathlib import Path
|
14 |
-
import os
|
15 |
-
|
16 |
-
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
17 |
-
BASE_DIR = Path(__file__).resolve().parent.parent
|
18 |
-
|
19 |
-
|
20 |
-
# Quick-start development settings - unsuitable for production
|
21 |
-
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
22 |
-
|
23 |
-
# SECURITY WARNING: keep the secret key used in production secret!
|
24 |
-
SECRET_KEY = 'django-insecure-f221fh+#lk4ul5x@gk7bm2x5f&+u3uhu+t-(bri%t(uh!z6gf#'
|
25 |
-
|
26 |
-
# SECURITY WARNING: don't run with debug turned on in production!
|
27 |
-
DEBUG = True
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
'django.contrib.
|
37 |
-
'django.contrib.
|
38 |
-
'django.contrib.
|
39 |
-
'django.contrib.
|
40 |
-
'django.contrib.
|
41 |
-
'
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
'django.
|
47 |
-
'django.middleware.
|
48 |
-
'django.middleware.
|
49 |
-
'django.
|
50 |
-
'django.contrib.
|
51 |
-
'django.middleware.
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
'
|
60 |
-
'
|
61 |
-
'
|
62 |
-
|
63 |
-
|
64 |
-
'django.template.context_processors.
|
65 |
-
'django.
|
66 |
-
'django.contrib.
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
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 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
#
|
144 |
-
|
145 |
-
|
|
|
|
1 |
+
"""
|
2 |
+
Django settings for cloudStorage project.
|
3 |
+
|
4 |
+
Generated by 'django-admin startproject' using Django 4.0.4.
|
5 |
+
|
6 |
+
For more information on this file, see
|
7 |
+
https://docs.djangoproject.com/en/4.0/topics/settings/
|
8 |
+
|
9 |
+
For the full list of settings and their values, see
|
10 |
+
https://docs.djangoproject.com/en/4.0/ref/settings/
|
11 |
+
"""
|
12 |
+
|
13 |
+
from pathlib import Path
|
14 |
+
import os
|
15 |
+
|
16 |
+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
17 |
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
18 |
+
|
19 |
+
|
20 |
+
# Quick-start development settings - unsuitable for production
|
21 |
+
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
|
22 |
+
|
23 |
+
# SECURITY WARNING: keep the secret key used in production secret!
|
24 |
+
SECRET_KEY = 'django-insecure-f221fh+#lk4ul5x@gk7bm2x5f&+u3uhu+t-(bri%t(uh!z6gf#'
|
25 |
+
|
26 |
+
# SECURITY WARNING: don't run with debug turned on in production!
|
27 |
+
DEBUG = True
|
28 |
+
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
29 |
+
|
30 |
+
ALLOWED_HOSTS = ['127.0.0.1', 'thejagstudio-cloudstorage.hf.space']
|
31 |
+
|
32 |
+
|
33 |
+
# Application definition
|
34 |
+
|
35 |
+
INSTALLED_APPS = [
|
36 |
+
'django.contrib.admin',
|
37 |
+
'django.contrib.auth',
|
38 |
+
'django.contrib.contenttypes',
|
39 |
+
'django.contrib.sessions',
|
40 |
+
'django.contrib.messages',
|
41 |
+
'django.contrib.staticfiles',
|
42 |
+
'home',
|
43 |
+
]
|
44 |
+
|
45 |
+
MIDDLEWARE = [
|
46 |
+
'django.middleware.security.SecurityMiddleware',
|
47 |
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
48 |
+
'django.middleware.common.CommonMiddleware',
|
49 |
+
'django.middleware.csrf.CsrfViewMiddleware',
|
50 |
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
51 |
+
'django.contrib.messages.middleware.MessageMiddleware',
|
52 |
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
53 |
+
]
|
54 |
+
|
55 |
+
ROOT_URLCONF = 'cloudStorage.urls'
|
56 |
+
|
57 |
+
TEMPLATES = [
|
58 |
+
{
|
59 |
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
60 |
+
'DIRS': ['templates'],
|
61 |
+
'APP_DIRS': True,
|
62 |
+
'OPTIONS': {
|
63 |
+
'context_processors': [
|
64 |
+
'django.template.context_processors.debug',
|
65 |
+
'django.template.context_processors.request',
|
66 |
+
'django.contrib.auth.context_processors.auth',
|
67 |
+
'django.contrib.messages.context_processors.messages',
|
68 |
+
],
|
69 |
+
},
|
70 |
+
},
|
71 |
+
]
|
72 |
+
|
73 |
+
WSGI_APPLICATION = 'cloudStorage.wsgi.application'
|
74 |
+
|
75 |
+
|
76 |
+
# Database
|
77 |
+
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
78 |
+
|
79 |
+
DATABASES = {
|
80 |
+
'default': {
|
81 |
+
'ENGINE': 'django.db.backends.postgresql',
|
82 |
+
'NAME': 'postgres',
|
83 |
+
'USER': 'postgres.dfnawdyzwhxsjsyvlgbi',
|
84 |
+
'PORT': 5432,
|
85 |
+
'PASSWORD': 'luwNgwCcDNLbZ5qt',
|
86 |
+
'HOST': 'aws-0-ap-south-1.pooler.supabase.com',
|
87 |
+
}
|
88 |
+
}
|
89 |
+
# DATABASES = {
|
90 |
+
# 'default': {
|
91 |
+
# 'ENGINE': 'django.db.backends.sqlite3',
|
92 |
+
# 'NAME': BASE_DIR / 'db.sqlite3',
|
93 |
+
# }
|
94 |
+
# }
|
95 |
+
|
96 |
+
|
97 |
+
# Password validation
|
98 |
+
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
|
99 |
+
|
100 |
+
AUTH_PASSWORD_VALIDATORS = [
|
101 |
+
{
|
102 |
+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
103 |
+
},
|
104 |
+
{
|
105 |
+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
106 |
+
},
|
107 |
+
{
|
108 |
+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
109 |
+
},
|
110 |
+
{
|
111 |
+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
112 |
+
},
|
113 |
+
]
|
114 |
+
|
115 |
+
|
116 |
+
# Internationalization
|
117 |
+
# https://docs.djangoproject.com/en/4.0/topics/i18n/
|
118 |
+
|
119 |
+
LANGUAGE_CODE = 'en-us'
|
120 |
+
|
121 |
+
TIME_ZONE = 'UTC'
|
122 |
+
|
123 |
+
USE_I18N = True
|
124 |
+
|
125 |
+
USE_TZ = True
|
126 |
+
|
127 |
+
|
128 |
+
# Static files (CSS, JavaScript, Images)
|
129 |
+
# https://docs.djangoproject.com/en/4.0/howto/static-files/
|
130 |
+
|
131 |
+
STATIC_URL = '/static/'
|
132 |
+
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
133 |
+
|
134 |
+
|
135 |
+
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
136 |
+
EMAIL_HOST = 'smtp.gmail.com'
|
137 |
+
EMAIL_USE_TLS = True
|
138 |
+
EMAIL_PORT = 587
|
139 |
+
EMAIL_HOST_USER = 'tempmailpatel@gmail.com'
|
140 |
+
EMAIL_HOST_PASSWORD = 'Patel@99'
|
141 |
+
|
142 |
+
|
143 |
+
# Default primary key field type
|
144 |
+
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
|
145 |
+
|
146 |
+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|