Release notes and documentation don't mention queryset week_day breakage on mysql if you haven't loaded tzinfo
|Reported by:||Matt Austin||Owned by:||Aymeric Augustin|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When switching to Django 1.6b2, queries such as
MyModel.objects.filter(start_at__week_day=1) started returning empty querysets. After investigation, it turned out I had to load tzinfo in to the database, as described at https://docs.djangoproject.com/en/1.6/ref/models/querysets/#database-time-zone-definitions. Although the release notes mention this is required for the new QuerySet.datetimes() functionality, there was nothing mentioning it was required for using week_day lookups.
As this could break previously working projects with Django 1.5, it should probably be made clear in the release notes and queryset documentation.
Change History (6)
comment:1 Changed 3 years ago by
|Owner:||changed from nobody to Aymeric Augustin|
|Severity:||Normal → Release blocker|
|Status:||new → assigned|