Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.utils import timezone
- class TimezoneMiddleware(object):
- def process_request(self, request):
- tz = request.session.get('django_timezone')
- if tz:
- timezone.activate(tz)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement