From d6bf990ea2db4b9458371c7aa709e1ec40389c29 Mon Sep 17 00:00:00 2001 From: Kegan Maher Date: Tue, 20 Feb 2024 13:00:21 -0800 Subject: [PATCH] chore(docs): update references to Django docs we use Django 5.x now --- benefits/settings.py | 2 +- benefits/urls.py | 2 +- docs/README.md | 2 +- docs/configuration/README.md | 8 ++++---- docs/configuration/environment-variables.md | 8 ++++---- docs/development/i18n.md | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/benefits/settings.py b/benefits/settings.py index ce3f7eeb5..35163a339 100644 --- a/benefits/settings.py +++ b/benefits/settings.py @@ -124,7 +124,7 @@ def RUNTIME_ENVIRONMENT(): # SSL terminates before getting to Django, and NGINX adds this header to indicate # if the original request was secure or not # -# See https://docs.djangoproject.com/en/4.0/ref/settings/#secure-proxy-ssl-header +# See https://docs.djangoproject.com/en/5.0/ref/settings/#secure-proxy-ssl-header if not DEBUG: SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") diff --git a/benefits/urls.py b/benefits/urls.py index 0a5d658ec..30d95f018 100644 --- a/benefits/urls.py +++ b/benefits/urls.py @@ -2,7 +2,7 @@ benefits URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/4.0/topics/http/urls/ + https://docs.djangoproject.com/en/5.0/topics/http/urls/ """ import logging diff --git a/docs/README.md b/docs/README.md index 0c7405759..d7a01dbbc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -96,4 +96,4 @@ All code changes are reviewed by at least one other member of the engineering te [interconnections]: deployment/infrastructure/#system-interconnections [hosting]: deployment/ [littlepay]: https://littlepay.com/ -[i18n]: https://docs.djangoproject.com/en/4.0/topics/i18n/ +[i18n]: https://docs.djangoproject.com/en/5.0/topics/i18n/ diff --git a/docs/configuration/README.md b/docs/configuration/README.md index ef12dcede..9ed629e16 100644 --- a/docs/configuration/README.md +++ b/docs/configuration/README.md @@ -13,7 +13,7 @@ startup. The model objects defined in the data migration file are also loaded into and seed Django's database at application startup time. - See the [Setting secrets](../deployment/secrets) section for how to set secret values for a deployment. +See the [Setting secrets](../deployment/secrets) section for how to set secret values for a deployment. ## Django settings @@ -77,9 +77,9 @@ else: [benefits-manage]: https://github.com/cal-itp/benefits/blob/dev/manage.py [benefits-settings]: https://github.com/cal-itp/benefits/blob/dev/benefits/settings.py [benefits-wsgi]: https://github.com/cal-itp/benefits/blob/dev/benefits/wsgi.py -[django-model]: https://docs.djangoproject.com/en/4.0/topics/db/models/ -[django-settings]: https://docs.djangoproject.com/en/4.0/topics/settings/ -[django-using-settings]: https://docs.djangoproject.com/en/4.0/topics/settings/#using-settings-in-python-code +[django-model]: https://docs.djangoproject.com/en/5.0/topics/db/models/ +[django-settings]: https://docs.djangoproject.com/en/5.0/topics/settings/ +[django-using-settings]: https://docs.djangoproject.com/en/5.0/topics/settings/#using-settings-in-python-code [env-vars]: environment-variables.md [data]: data.md [getting-started]: ../getting-started/README.md diff --git a/docs/configuration/environment-variables.md b/docs/configuration/environment-variables.md index 455a637b1..cd150c283 100644 --- a/docs/configuration/environment-variables.md +++ b/docs/configuration/environment-variables.md @@ -57,7 +57,7 @@ If blank or an invalid key, analytics events aren't captured (though may still b !!! tldr "Django docs" - [Settings: `ALLOWS_HOSTS`](https://docs.djangoproject.com/en/4.0/ref/settings/#allowed-hosts) + [Settings: `ALLOWS_HOSTS`](https://docs.djangoproject.com/en/5.0/ref/settings/#allowed-hosts) A list of strings representing the host/domain names that this Django site can serve. @@ -142,7 +142,7 @@ From inside the container, the app is always listening on port `8000`. !!! tldr "Django docs" - [Settings: `LOGGING_CONFIG`](https://docs.djangoproject.com/en/4.0/ref/settings/#logging-config) + [Settings: `LOGGING_CONFIG`](https://docs.djangoproject.com/en/5.0/ref/settings/#logging-config) The log level used in the application's logging configuration. @@ -156,7 +156,7 @@ By default the application sends logs to `stdout`. !!! tldr "Django docs" - [Settings: `SECRET_KEY`](https://docs.djangoproject.com/en/4.0/ref/settings/#secret-key) + [Settings: `SECRET_KEY`](https://docs.djangoproject.com/en/5.0/ref/settings/#secret-key) Django's primary secret, keep this safe! @@ -192,7 +192,7 @@ The username of the Django Admin superuser created when resetting the database. !!! tldr "Django docs" - [Settings: `CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins) + [Settings: `CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/5.0/ref/settings/#csrf-trusted-origins) Comma-separated list of hosts which are trusted origins for unsafe requests (e.g. POST) diff --git a/docs/development/i18n.md b/docs/development/i18n.md index 093a7e102..4dfcfb24e 100644 --- a/docs/development/i18n.md +++ b/docs/development/i18n.md @@ -2,9 +2,9 @@ !!! tldr "Django docs" - [Internationalization and localization](https://docs.djangoproject.com/en/4.0/topics/i18n/) + [Internationalization and localization](https://docs.djangoproject.com/en/5.0/topics/i18n/) - [Translation](https://docs.djangoproject.com/en/4.0/topics/i18n/translation/) + [Translation](https://docs.djangoproject.com/en/5.0/topics/i18n/translation/) !!! example "Message files" @@ -12,7 +12,7 @@ The Cal-ITP Benefits application is fully internationalized and available in both English and Spanish. -It uses Django's built-in support for translation using [message files](https://docs.djangoproject.com/en/4.0/topics/i18n/#term-message-file), which contain entries of `msgid`/`msgstr` pairs. The `msgid` is referenced in source code so that Django takes care of showing the `msgstr` for the user's language. +It uses Django's built-in support for translation using [message files](https://docs.djangoproject.com/en/5S.0/topics/i18n/#term-message-file), which contain entries of `msgid`/`msgstr` pairs. The `msgid` is referenced in source code so that Django takes care of showing the `msgstr` for the user's language. ## Updating message files @@ -42,7 +42,7 @@ When templates have different copy per agency, create a new template for that ag ### Fuzzy strings -From [Django docs](https://docs.djangoproject.com/en/4.0/topics/i18n/translation/#message-files): +From [Django docs](https://docs.djangoproject.com/en/5.0/topics/i18n/translation/#message-files): > `makemessages` sometimes generates translation entries marked as fuzzy, e.g. when translations are inferred from previously translated strings.