thejagstudio commited on
Commit
866ee71
1 Parent(s): bd59a6f

Update cloudStorage/settings.py

Browse files
Files changed (1) hide show
  1. cloudStorage/settings.py +145 -145
cloudStorage/settings.py CHANGED
@@ -1,145 +1,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
-
29
- ALLOWED_HOSTS = ['127.0.0.1', 'cloudstorageunlimited.herokuapp.com', 'thejagstudio123.pythonanywhere.com']
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
+
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'