|
1 | 1 | """ |
2 | 2 | Django settings for gettingstarted project. |
3 | 3 |
|
4 | | -Generated by 'django-admin startproject' using Django 4.2.1. |
| 4 | +Generated by 'django-admin startproject' using Django 5.0. |
5 | 5 |
|
6 | 6 | For more information on this file, see |
7 | | -https://docs.djangoproject.com/en/4.2/topics/settings/ |
| 7 | +https://docs.djangoproject.com/en/5.0/topics/settings/ |
8 | 8 |
|
9 | 9 | For the full list of settings and their values, see |
10 | | -https://docs.djangoproject.com/en/4.2/ref/settings/ |
| 10 | +https://docs.djangoproject.com/en/5.0/ref/settings/ |
11 | 11 | """ |
12 | 12 |
|
13 | 13 | import os |
|
21 | 21 |
|
22 | 22 |
|
23 | 23 | # Before using your Heroku app in production, make sure to review Django's deployment checklist: |
24 | | -# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ |
| 24 | +# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ |
25 | 25 |
|
26 | 26 | # Django requires a unique secret key for each Django app, that is used by several of its |
27 | 27 | # security features. To simplify initial setup (without hardcoding the secret in the source |
28 | 28 | # code) we set this to a random value every time the app starts. However, this will mean many |
29 | 29 | # Django features break whenever an app restarts (for example, sessions will be logged out). |
30 | 30 | # In your production Heroku apps you should set the `DJANGO_SECRET_KEY` config var explicitly. |
31 | 31 | # Make sure to use a long unique value, like you would for a password. See: |
32 | | -# https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-SECRET_KEY |
| 32 | +# https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-SECRET_KEY |
33 | 33 | # https://devcenter.heroku.com/articles/config-vars |
34 | 34 | # SECURITY WARNING: keep the secret key used in production secret! |
35 | 35 | SECRET_KEY = os.environ.get( |
|
49 | 49 | # On Heroku, it's safe to use a wildcard for `ALLOWED_HOSTS``, since the Heroku router performs |
50 | 50 | # validation of the Host header in the incoming HTTP request. On other platforms you may need |
51 | 51 | # to list the expected hostnames explicitly to prevent HTTP Host header attacks. See: |
52 | | -# https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-ALLOWED_HOSTS |
| 52 | +# https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-ALLOWED_HOSTS |
53 | 53 | if IS_HEROKU_APP: |
54 | 54 | ALLOWED_HOSTS = ["*"] |
55 | 55 | else: |
|
62 | 62 | # Use WhiteNoise's runserver implementation instead of the Django default, for dev-prod parity. |
63 | 63 | "whitenoise.runserver_nostatic", |
64 | 64 | # Uncomment this and the entry in `urls.py` if you wish to use the Django admin feature: |
65 | | - # https://docs.djangoproject.com/en/4.2/ref/contrib/admin/ |
| 65 | + # https://docs.djangoproject.com/en/5.0/ref/contrib/admin/ |
66 | 66 | # "django.contrib.admin", |
67 | 67 | "django.contrib.auth", |
68 | 68 | "django.contrib.contenttypes", |
|
109 | 109 |
|
110 | 110 |
|
111 | 111 | # Database |
112 | | -# https://docs.djangoproject.com/en/4.2/ref/settings/#databases |
| 112 | +# https://docs.djangoproject.com/en/5.0/ref/settings/#databases |
113 | 113 |
|
114 | 114 | if IS_HEROKU_APP: |
115 | 115 | # In production on Heroku the database configuration is derived from the `DATABASE_URL` |
|
136 | 136 |
|
137 | 137 |
|
138 | 138 | # Password validation |
139 | | -# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators |
| 139 | +# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators |
140 | 140 |
|
141 | 141 | AUTH_PASSWORD_VALIDATORS = [ |
142 | 142 | { |
|
155 | 155 |
|
156 | 156 |
|
157 | 157 | # Internationalization |
158 | | -# https://docs.djangoproject.com/en/4.2/topics/i18n/ |
| 158 | +# https://docs.djangoproject.com/en/5.0/topics/i18n/ |
159 | 159 |
|
160 | 160 | LANGUAGE_CODE = "en-us" |
161 | 161 |
|
|
167 | 167 |
|
168 | 168 |
|
169 | 169 | # Static files (CSS, JavaScript, Images) |
170 | | -# https://docs.djangoproject.com/en/4.2/howto/static-files/ |
| 170 | +# https://docs.djangoproject.com/en/5.0/howto/static-files/ |
171 | 171 |
|
172 | 172 | STATIC_ROOT = BASE_DIR / "staticfiles" |
173 | 173 | STATIC_URL = "static/" |
|
186 | 186 |
|
187 | 187 |
|
188 | 188 | # Default primary key field type |
189 | | -# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field |
| 189 | +# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field |
190 | 190 |
|
191 | 191 | DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" |
0 commit comments