thejagstudio commited on
Commit
3a9c601
1 Parent(s): e82b670

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