Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improved the timezone middleware example slightly.

This change avoids having the timezone leak from a request to the next.
  • Loading branch information...
commit c8dcee9a423fa3f31a2303e7ec20a924775730a2 1 parent 84d8b24
Aymeric Augustin authored May 15, 2013

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  docs/topics/i18n/timezones.txt
2  docs/topics/i18n/timezones.txt
@@ -189,6 +189,8 @@ Add the following middleware to :setting:`MIDDLEWARE_CLASSES`::
189 189
             tz = request.session.get('django_timezone')
190 190
             if tz:
191 191
                 timezone.activate(tz)
  192
+            else:
  193
+                timezone.deactivate()
192 194
 
193 195
 Create a view that can set the current timezone::
194 196
 

0 notes on commit c8dcee9

Please sign in to comment.
Something went wrong with that request. Please try again.