thejagstudio commited on
Commit
92714c2
·
verified ·
1 Parent(s): ebe3273

Update hsapssconnect/settings.py

Browse files
Files changed (1) hide show
  1. hsapssconnect/settings.py +169 -169
hsapssconnect/settings.py CHANGED
@@ -1,169 +1,169 @@
1
- """
2
- Django settings for hsapssconnect project.
3
-
4
- Generated by 'django-admin startproject' using Django 5.0.6.
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
- from datetime import timedelta
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/5.0/howto/deployment/checklist/
22
-
23
- # SECURITY WARNING: keep the secret key used in production secret!
24
- SECRET_KEY = "django-insecure-lde0hgz*y9#h@sbz_u6&=&=i9cef23em^sax91iqb_)1#2s*qd"
25
-
26
- # SECURITY WARNING: don't run with debug turned on in production!
27
- DEBUG = True
28
-
29
- ALLOWED_HOSTS = ["*", "127.0.0.1", "localhost"]
30
- CORS_ORIGIN_ALLOW_ALL = True
31
- CORS_ALLOW_CREDENTIALS = False
32
-
33
- # SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
34
- # SECURE_SSL_REDIRECT = True
35
- # SESSION_COOKIE_SECURE = True
36
- # CSRF_COOKIE_SECURE = True
37
-
38
-
39
- # Application definition
40
-
41
- INSTALLED_APPS = [
42
- "django.contrib.admin",
43
- "django.contrib.auth",
44
- "django.contrib.contenttypes",
45
- "django.contrib.sessions",
46
- "django.contrib.messages",
47
- "django.contrib.staticfiles",
48
- "api",
49
- "corsheaders",
50
- "import_export",
51
- "rest_framework",
52
- "rest_framework_simplejwt",
53
- "rest_framework_simplejwt.token_blacklist",
54
- ]
55
-
56
- MIDDLEWARE = [
57
- "django.middleware.security.SecurityMiddleware",
58
- "django.contrib.sessions.middleware.SessionMiddleware",
59
- 'corsheaders.middleware.CorsMiddleware',
60
- "django.middleware.common.CommonMiddleware",
61
- "django.middleware.csrf.CsrfViewMiddleware",
62
- "django.contrib.auth.middleware.AuthenticationMiddleware",
63
- "django.contrib.messages.middleware.MessageMiddleware",
64
- "django.middleware.clickjacking.XFrameOptionsMiddleware",
65
- ]
66
-
67
- ROOT_URLCONF = "hsapssconnect.urls"
68
-
69
- TEMPLATES = [
70
- {
71
- "BACKEND": "django.template.backends.django.DjangoTemplates",
72
- "DIRS": [],
73
- "APP_DIRS": True,
74
- "OPTIONS": {
75
- "context_processors": [
76
- "django.template.context_processors.debug",
77
- "django.template.context_processors.request",
78
- "django.contrib.auth.context_processors.auth",
79
- "django.contrib.messages.context_processors.messages",
80
- ],
81
- },
82
- },
83
- ]
84
-
85
- WSGI_APPLICATION = "hsapssconnect.wsgi.application"
86
-
87
-
88
- # Database
89
- # https://docs.djangoproject.com/en/5.0/ref/settings/#databases
90
-
91
- DATABASES = {
92
- 'default': {
93
- 'ENGINE': 'django.db.backends.postgresql',
94
- 'NAME': 'postgres',
95
- 'USER': 'postgres.psjobjezrtkjvenhsmge',
96
- 'PORT': 6543,
97
- 'PASSWORD': 'ErO9vgKcwCA1bdah',
98
- 'HOST': 'aws-0-us-east-1.pooler.supabase.com',
99
- }
100
- # "default": {
101
- # "ENGINE": "django.db.backends.sqlite3",
102
- # "NAME": BASE_DIR / "db.sqlite3",
103
- # }
104
- }
105
-
106
- # Password validation
107
- # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
108
-
109
- AUTH_PASSWORD_VALIDATORS = [
110
- {
111
- "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
112
- },
113
- {
114
- "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
115
- },
116
- {
117
- "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
118
- },
119
- {
120
- "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
121
- },
122
- ]
123
-
124
-
125
- # Internationalization
126
- # https://docs.djangoproject.com/en/5.0/topics/i18n/
127
-
128
- LANGUAGE_CODE = "en-us"
129
-
130
- TIME_ZONE = "EST"
131
-
132
- USE_I18N = True
133
-
134
- USE_TZ = True
135
-
136
-
137
- # Static files (CSS, JavaScript, Images)
138
- # https://docs.djangoproject.com/en/5.0/howto/static-files/
139
-
140
- STATIC_URL = "static/"
141
-
142
- # Default primary key field type
143
- # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
144
-
145
- DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
146
- AUTH_USER_MODEL = 'api.Bhagat'
147
-
148
-
149
- RECAPTCHA_SITE_KEY = '6LfDVWUqAAAAAOPlzTro2t51YeymYoz-Pt89tarF'
150
- RECAPTCHA_SECRET_KEY = '6LfDVWUqAAAAACzIE4ZKx71R0smuDVJaV-GBLR66'
151
-
152
- REST_FRAMEWORK = {
153
- 'DEFAULT_AUTHENTICATION_CLASSES': (
154
- 'rest_framework_simplejwt.authentication.JWTAuthentication',
155
- ),
156
- 'DEFAULT_RENDERER_CLASSES': [
157
- 'rest_framework.renderers.JSONRenderer',
158
- 'rest_framework.renderers.BrowsableAPIRenderer',
159
- ],
160
- }
161
-
162
- SIMPLE_JWT = {
163
- 'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60),
164
- 'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
165
- 'ROTATE_REFRESH_TOKENS': False,
166
- 'ALGORITHM': 'HS256',
167
- 'SIGNING_KEY': 'HariPremci6fhen4G3iGpCE0IYrhLOPCWAvoxxVw',
168
- 'AUTH_HEADER_TYPES': ('Bearer',),
169
- }
 
1
+ """
2
+ Django settings for hsapssconnect project.
3
+
4
+ Generated by 'django-admin startproject' using Django 5.0.6.
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
+ from datetime import timedelta
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/5.0/howto/deployment/checklist/
22
+
23
+ # SECURITY WARNING: keep the secret key used in production secret!
24
+ SECRET_KEY = "django-insecure-lde0hgz*y9#h@sbz_u6&=&=i9cef23em^sax91iqb_)1#2s*qd"
25
+
26
+ # SECURITY WARNING: don't run with debug turned on in production!
27
+ DEBUG = True
28
+
29
+ ALLOWED_HOSTS = ["*", "127.0.0.1", "localhost","thejagstudio-connect.hf.space"]
30
+ CORS_ORIGIN_ALLOW_ALL = True
31
+ CORS_ALLOW_CREDENTIALS = False
32
+
33
+ # SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
34
+ # SECURE_SSL_REDIRECT = True
35
+ # SESSION_COOKIE_SECURE = True
36
+ # CSRF_COOKIE_SECURE = True
37
+
38
+
39
+ # Application definition
40
+
41
+ INSTALLED_APPS = [
42
+ "django.contrib.admin",
43
+ "django.contrib.auth",
44
+ "django.contrib.contenttypes",
45
+ "django.contrib.sessions",
46
+ "django.contrib.messages",
47
+ "django.contrib.staticfiles",
48
+ "api",
49
+ "corsheaders",
50
+ "import_export",
51
+ "rest_framework",
52
+ "rest_framework_simplejwt",
53
+ "rest_framework_simplejwt.token_blacklist",
54
+ ]
55
+
56
+ MIDDLEWARE = [
57
+ "django.middleware.security.SecurityMiddleware",
58
+ "django.contrib.sessions.middleware.SessionMiddleware",
59
+ 'corsheaders.middleware.CorsMiddleware',
60
+ "django.middleware.common.CommonMiddleware",
61
+ "django.middleware.csrf.CsrfViewMiddleware",
62
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
63
+ "django.contrib.messages.middleware.MessageMiddleware",
64
+ "django.middleware.clickjacking.XFrameOptionsMiddleware",
65
+ ]
66
+
67
+ ROOT_URLCONF = "hsapssconnect.urls"
68
+
69
+ TEMPLATES = [
70
+ {
71
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
72
+ "DIRS": [],
73
+ "APP_DIRS": True,
74
+ "OPTIONS": {
75
+ "context_processors": [
76
+ "django.template.context_processors.debug",
77
+ "django.template.context_processors.request",
78
+ "django.contrib.auth.context_processors.auth",
79
+ "django.contrib.messages.context_processors.messages",
80
+ ],
81
+ },
82
+ },
83
+ ]
84
+
85
+ WSGI_APPLICATION = "hsapssconnect.wsgi.application"
86
+
87
+
88
+ # Database
89
+ # https://docs.djangoproject.com/en/5.0/ref/settings/#databases
90
+
91
+ DATABASES = {
92
+ 'default': {
93
+ 'ENGINE': 'django.db.backends.postgresql',
94
+ 'NAME': 'postgres',
95
+ 'USER': 'postgres.psjobjezrtkjvenhsmge',
96
+ 'PORT': 6543,
97
+ 'PASSWORD': 'ErO9vgKcwCA1bdah',
98
+ 'HOST': 'aws-0-us-east-1.pooler.supabase.com',
99
+ }
100
+ # "default": {
101
+ # "ENGINE": "django.db.backends.sqlite3",
102
+ # "NAME": BASE_DIR / "db.sqlite3",
103
+ # }
104
+ }
105
+
106
+ # Password validation
107
+ # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
108
+
109
+ AUTH_PASSWORD_VALIDATORS = [
110
+ {
111
+ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
112
+ },
113
+ {
114
+ "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
115
+ },
116
+ {
117
+ "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
118
+ },
119
+ {
120
+ "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
121
+ },
122
+ ]
123
+
124
+
125
+ # Internationalization
126
+ # https://docs.djangoproject.com/en/5.0/topics/i18n/
127
+
128
+ LANGUAGE_CODE = "en-us"
129
+
130
+ TIME_ZONE = "EST"
131
+
132
+ USE_I18N = True
133
+
134
+ USE_TZ = True
135
+
136
+
137
+ # Static files (CSS, JavaScript, Images)
138
+ # https://docs.djangoproject.com/en/5.0/howto/static-files/
139
+
140
+ STATIC_URL = "static/"
141
+
142
+ # Default primary key field type
143
+ # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
144
+
145
+ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
146
+ AUTH_USER_MODEL = 'api.Bhagat'
147
+
148
+
149
+ RECAPTCHA_SITE_KEY = '6LfDVWUqAAAAAOPlzTro2t51YeymYoz-Pt89tarF'
150
+ RECAPTCHA_SECRET_KEY = '6LfDVWUqAAAAACzIE4ZKx71R0smuDVJaV-GBLR66'
151
+
152
+ REST_FRAMEWORK = {
153
+ 'DEFAULT_AUTHENTICATION_CLASSES': (
154
+ 'rest_framework_simplejwt.authentication.JWTAuthentication',
155
+ ),
156
+ 'DEFAULT_RENDERER_CLASSES': [
157
+ 'rest_framework.renderers.JSONRenderer',
158
+ 'rest_framework.renderers.BrowsableAPIRenderer',
159
+ ],
160
+ }
161
+
162
+ SIMPLE_JWT = {
163
+ 'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60),
164
+ 'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
165
+ 'ROTATE_REFRESH_TOKENS': False,
166
+ 'ALGORITHM': 'HS256',
167
+ 'SIGNING_KEY': 'HariPremci6fhen4G3iGpCE0IYrhLOPCWAvoxxVw',
168
+ 'AUTH_HEADER_TYPES': ('Bearer',),
169
+ }