Skip to content

Commit

Permalink
chore(docs): update references to Django docs
Browse files Browse the repository at this point in the history
we use Django 5.x now
  • Loading branch information
thekaveman committed Feb 20, 2024
1 parent e37ed91 commit d6bf990
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion benefits/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion benefits/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
8 changes: 4 additions & 4 deletions docs/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions docs/configuration/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand All @@ -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!

Expand Down Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions docs/development/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

!!! 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"

English messages: [benefits/locale/en/LC_MESSAGES/django.po](https://github.com/cal-itp/benefits/blob/dev/benefits/locale/en/LC_MESSAGES/django.po)

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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d6bf990

Please sign in to comment.