eonvelope.views.timezone module¶
Module with views for working with timezones in Eonvelope project.
- eonvelope.views.timezone.set_timezone(request)[source]¶
Redirect to a given URL while setting the chosen timezone in the session.
The URL and the timezone code need to be specified in the request parameters.
Since this view changes how the user will see the rest of the site, it must only be accessed as a POST request. If called as a GET request, it will redirect to the page in the request (the ‘next’ parameter) without changing any state.
Note
Analogous to
django.views.i18n.get_language().- Return type:
- Parameters:
request (HttpRequest)