Re: timezone.override() doesn't play well with template response views, by default

2012-05-01 Thread Aymeric Augustin
On 1 mai 2012, at 19:28, Yo-Yo Ma wrote: > This is because the context manager returns control after dispatch is called, > but the lazy response isn't rendered to a string until later on Hello, This behavior isn't specific to `timezone.override`. It would also happen with other context manager

timezone.override() doesn't play well with template response views, by default

2012-05-01 Thread Yo-Yo Ma
Regarding https://docs.djangoproject.com/en/dev/ref/utils/#django.utils.timezone.override # views.py class TZView(DetailView): def dispatch(self, request, *args, **kwargs): with timezone.override(est_tz): # Assuming your default timezone is US/Pacific return super(TZView