thejagstudio commited on
Commit
9b9f897
1 Parent(s): 36c062e

Update cloudStorage/settings.py

Browse files
Files changed (1) hide show
  1. 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
- ALLOWED_HOSTS = ['127.0.0.1', 'thejagstudio-cloudstorage.hf.space']
30
-
31
-
32
- # Application definition
33
-
34
- INSTALLED_APPS = [
35
- 'django.contrib.admin',
36
- 'django.contrib.auth',
37
- 'django.contrib.contenttypes',
38
- 'django.contrib.sessions',
39
- 'django.contrib.messages',
40
- 'django.contrib.staticfiles',
41
- 'home',
42
- ]
43
-
44
- MIDDLEWARE = [
45
- 'django.middleware.security.SecurityMiddleware',
46
- 'django.contrib.sessions.middleware.SessionMiddleware',
47
- 'django.middleware.common.CommonMiddleware',
48
- 'django.middleware.csrf.CsrfViewMiddleware',
49
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
50
- 'django.contrib.messages.middleware.MessageMiddleware',
51
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52
- ]
53
-
54
- ROOT_URLCONF = 'cloudStorage.urls'
55
-
56
- TEMPLATES = [
57
- {
58
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
59
- 'DIRS': ['templates'],
60
- 'APP_DIRS': True,
61
- 'OPTIONS': {
62
- 'context_processors': [
63
- 'django.template.context_processors.debug',
64
- 'django.template.context_processors.request',
65
- 'django.contrib.auth.context_processors.auth',
66
- 'django.contrib.messages.context_processors.messages',
67
- ],
68
- },
69
- },
70
- ]
71
-
72
- WSGI_APPLICATION = 'cloudStorage.wsgi.application'
73
-
74
-
75
- # Database
76
- # https://docs.djangoproject.com/en/4.0/ref/settings/#databases
77
-
78
- DATABASES = {
79
- 'default': {
80
- 'ENGINE': 'django.db.backends.postgresql',
81
- 'NAME': 'postgres',
82
- 'USER': 'postgres.dfnawdyzwhxsjsyvlgbi',
83
- 'PORT': 5432,
84
- 'PASSWORD': 'luwNgwCcDNLbZ5qt',
85
- 'HOST': 'aws-0-ap-south-1.pooler.supabase.com',
86
- }
87
- }
88
- # DATABASES = {
89
- # 'default': {
90
- # 'ENGINE': 'django.db.backends.sqlite3',
91
- # 'NAME': BASE_DIR / 'db.sqlite3',
92
- # }
93
- # }
94
-
95
-
96
- # Password validation
97
- # https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
98
-
99
- AUTH_PASSWORD_VALIDATORS = [
100
- {
101
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
102
- },
103
- {
104
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
105
- },
106
- {
107
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
108
- },
109
- {
110
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
111
- },
112
- ]
113
-
114
-
115
- # Internationalization
116
- # https://docs.djangoproject.com/en/4.0/topics/i18n/
117
-
118
- LANGUAGE_CODE = 'en-us'
119
-
120
- TIME_ZONE = 'UTC'
121
-
122
- USE_I18N = True
123
-
124
- USE_TZ = True
125
-
126
-
127
- # Static files (CSS, JavaScript, Images)
128
- # https://docs.djangoproject.com/en/4.0/howto/static-files/
129
-
130
- STATIC_URL = '/static/'
131
- STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
132
-
133
-
134
- EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
135
- EMAIL_HOST = 'smtp.gmail.com'
136
- EMAIL_USE_TLS = True
137
- EMAIL_PORT = 587
138
- EMAIL_HOST_USER = 'tempmailpatel@gmail.com'
139
- EMAIL_HOST_PASSWORD = 'Patel@99'
140
-
141
-
142
- # Default primary key field type
143
- # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
144
-
145
- DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
 
 
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'