thejagstudio commited on
Commit
a0116c8
·
verified ·
1 Parent(s): 034159c

Update instabuild/settings.py

Browse files
Files changed (1) hide show
  1. instabuild/settings.py +152 -137
instabuild/settings.py CHANGED
@@ -1,137 +1,152 @@
1
- """
2
- Django settings for instabuild project.
3
-
4
- Generated by 'django-admin startproject' using Django 5.1.2.
5
-
6
- For more information on this file, see
7
- https://docs.djangoproject.com/en/5.1/topics/settings/
8
-
9
- For the full list of settings and their values, see
10
- https://docs.djangoproject.com/en/5.1/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.1/howto/deployment/checklist/
21
-
22
- # SECURITY WARNING: keep the secret key used in production secret!
23
- SECRET_KEY = "django-insecure-8rdfha5*q&t&z_=95tmz=le4np_bl(t^l(*6a36(%&lj_+5j+*"
24
-
25
- # SECURITY WARNING: don't run with debug turned on in production!
26
- DEBUG = True
27
-
28
- ALLOWED_HOSTS = ["*"]
29
- CORS_ORIGIN_ALLOW_ALL = True
30
- CORS_ORIGIN_ALLOW_ALL = True
31
- CORS_ALLOW_CREDENTIALS = False
32
-
33
-
34
- # Application definition
35
-
36
- INSTALLED_APPS = [
37
- "django.contrib.admin",
38
- "django.contrib.auth",
39
- "django.contrib.contenttypes",
40
- "django.contrib.sessions",
41
- "django.contrib.messages",
42
- "django.contrib.staticfiles",
43
- "api",
44
- "corsheaders",
45
- "import_export",
46
- ]
47
-
48
- MIDDLEWARE = [
49
- "django.middleware.security.SecurityMiddleware",
50
- "django.contrib.sessions.middleware.SessionMiddleware",
51
- "corsheaders.middleware.CorsMiddleware",
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 = "instabuild.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 = "instabuild.wsgi.application"
78
-
79
-
80
- # Database
81
- # https://docs.djangoproject.com/en/5.1/ref/settings/#databases
82
-
83
- DATABASES = {
84
- 'default': {
85
- 'ENGINE': 'django.db.backends.postgresql',
86
- 'NAME': 'postgres',
87
- 'USER': 'postgres.hmfpsokyfhrqhmvmsgpk',
88
- 'PORT': 6543,
89
- 'PASSWORD': 'RSPuG9OZ3czmpiHh',
90
- 'HOST': 'aws-0-us-east-1.pooler.supabase.com',
91
- }
92
- }
93
- # "default": {
94
- # "ENGINE": "django.db.backends.sqlite3",
95
- # "NAME": BASE_DIR / "db.sqlite3",
96
- # }
97
-
98
- # Password validation
99
- # https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
100
-
101
- AUTH_PASSWORD_VALIDATORS = [
102
- {
103
- "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
104
- },
105
- {
106
- "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
107
- },
108
- {
109
- "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
110
- },
111
- {
112
- "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
113
- },
114
- ]
115
-
116
-
117
- # Internationalization
118
- # https://docs.djangoproject.com/en/5.1/topics/i18n/
119
-
120
- LANGUAGE_CODE = "en-us"
121
-
122
- TIME_ZONE = "UTC"
123
-
124
- USE_I18N = True
125
-
126
- USE_TZ = True
127
-
128
-
129
- # Static files (CSS, JavaScript, Images)
130
- # https://docs.djangoproject.com/en/5.1/howto/static-files/
131
-
132
- STATIC_URL = "static/"
133
-
134
- # Default primary key field type
135
- # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
136
-
137
- DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Django settings for instabuild project.
3
+
4
+ Generated by 'django-admin startproject' using Django 5.1.2.
5
+
6
+ For more information on this file, see
7
+ https://docs.djangoproject.com/en/5.1/topics/settings/
8
+
9
+ For the full list of settings and their values, see
10
+ https://docs.djangoproject.com/en/5.1/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.1/howto/deployment/checklist/
21
+
22
+ # SECURITY WARNING: keep the secret key used in production secret!
23
+ SECRET_KEY = "django-insecure-8rdfha5*q&t&z_=95tmz=le4np_bl(t^l(*6a36(%&lj_+5j+*"
24
+
25
+ # SECURITY WARNING: don't run with debug turned on in production!
26
+ DEBUG = True
27
+
28
+ ALLOWED_HOSTS = ["*", "127.0.0.1", "192.168.81.1", "192.168.12.61", "thejagstudio-instabuild.hf.space"]
29
+ CORS_ALLOWED_ORIGINS = [
30
+ "http://localhost:8081",
31
+ "http://localhost:19006",
32
+ "http://192.168.81.1:8000",
33
+ "http://192.168.12.61:8000",
34
+ "https://s4t6xdgk-5173.inc1.devtunnels.ms",
35
+ "http://thejagstudio-instabuild.hf.space",
36
+ "https://thejagstudio-instabuild.hf.space"
37
+ ]
38
+ CSRF_TRUSTED_ORIGINS = [
39
+ "http://localhost:8081",
40
+ "http://192.168.81.1:8000",
41
+ "http://192.168.12.61:8000",
42
+ "http://localhost:19006",
43
+ "https://s4t6xdgk-5173.inc1.devtunnels.ms",
44
+ "http://thejagstudio-instabuild.hf.space",
45
+ "https://thejagstudio-instabuild.hf.space"
46
+ ]
47
+
48
+
49
+ # Application definition
50
+
51
+ INSTALLED_APPS = [
52
+ "django.contrib.admin",
53
+ "django.contrib.auth",
54
+ "django.contrib.contenttypes",
55
+ "django.contrib.sessions",
56
+ "django.contrib.messages",
57
+ "django.contrib.staticfiles",
58
+ "api",
59
+ "corsheaders",
60
+ "import_export",
61
+ ]
62
+
63
+ MIDDLEWARE = [
64
+ "django.middleware.security.SecurityMiddleware",
65
+ "django.contrib.sessions.middleware.SessionMiddleware",
66
+ "corsheaders.middleware.CorsMiddleware",
67
+ "django.middleware.common.CommonMiddleware",
68
+ "django.middleware.csrf.CsrfViewMiddleware",
69
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
70
+ "django.contrib.messages.middleware.MessageMiddleware",
71
+ "django.middleware.clickjacking.XFrameOptionsMiddleware",
72
+ ]
73
+
74
+ ROOT_URLCONF = "instabuild.urls"
75
+
76
+ TEMPLATES = [
77
+ {
78
+ "BACKEND": "django.template.backends.django.DjangoTemplates",
79
+ "DIRS": [],
80
+ "APP_DIRS": True,
81
+ "OPTIONS": {
82
+ "context_processors": [
83
+ "django.template.context_processors.debug",
84
+ "django.template.context_processors.request",
85
+ "django.contrib.auth.context_processors.auth",
86
+ "django.contrib.messages.context_processors.messages",
87
+ ],
88
+ },
89
+ },
90
+ ]
91
+
92
+ WSGI_APPLICATION = "instabuild.wsgi.application"
93
+
94
+
95
+ # Database
96
+ # https://docs.djangoproject.com/en/5.1/ref/settings/#databases
97
+
98
+ DATABASES = {
99
+ 'default': {
100
+ 'ENGINE': 'django.db.backends.postgresql',
101
+ 'NAME': 'postgres',
102
+ 'USER': 'postgres.hmfpsokyfhrqhmvmsgpk',
103
+ 'PORT': 6543,
104
+ 'PASSWORD': 'RSPuG9OZ3czmpiHh',
105
+ 'HOST': 'aws-0-us-east-1.pooler.supabase.com',
106
+ }
107
+ }
108
+ # "default": {
109
+ # "ENGINE": "django.db.backends.sqlite3",
110
+ # "NAME": BASE_DIR / "db.sqlite3",
111
+ # }
112
+
113
+ # Password validation
114
+ # https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
115
+
116
+ AUTH_PASSWORD_VALIDATORS = [
117
+ {
118
+ "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
119
+ },
120
+ {
121
+ "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
122
+ },
123
+ {
124
+ "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
125
+ },
126
+ {
127
+ "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
128
+ },
129
+ ]
130
+
131
+
132
+ # Internationalization
133
+ # https://docs.djangoproject.com/en/5.1/topics/i18n/
134
+
135
+ LANGUAGE_CODE = "en-us"
136
+
137
+ TIME_ZONE = "UTC"
138
+
139
+ USE_I18N = True
140
+
141
+ USE_TZ = True
142
+
143
+
144
+ # Static files (CSS, JavaScript, Images)
145
+ # https://docs.djangoproject.com/en/5.1/howto/static-files/
146
+
147
+ STATIC_URL = "static/"
148
+
149
+ # Default primary key field type
150
+ # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
151
+
152
+ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"