django
django copied to clipboard
Updated docs example to use cookie-based storage for timezone handling
The current example for TimezoneMiddleware in the Django documentation uses sessions to store the user's time zone. With Django 4.0, the framework has deprecated the use of sessions for storing the user's language preference, opting for cookies instead. It seems logical to align the handling of time zones with this change for consistency and the advantages it offers.
See https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-4-0 and https://docs.djangoproject.com/en/dev/releases/3.0/#id3