Kaydet (Commit) c8dcee9a authored tarafından Aymeric Augustin's avatar Aymeric Augustin

Improved the timezone middleware example slightly.

This change avoids having the timezone leak from a request to the next.
üst 84d8b247
......@@ -189,6 +189,8 @@ Add the following middleware to :setting:`MIDDLEWARE_CLASSES`::
tz = request.session.get('django_timezone')
if tz:
timezone.activate(tz)
else:
timezone.deactivate()
Create a view that can set the current timezone::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment