When timezone support is enabled, permalinks for DateDetailView are impossible.
|Reported by:||void||Owned by:||aaugustin|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
With timezone support enabled, permalinks for DateDetailView are hard to create.
As clearly stated in docstring of DateMixin._make_date_lookup_arg,
When time zone support is enabled, `date` is assumed to be in the current time zone, so that displayed items are consistent with the URL.
As current time zone is a time zone of the current user, web site should generate different urls for different users in order them view same content and not 404 page. That's weird: we don't have permalinks anymore. User in Moscow may send a link to DateDetailView to another user in New York, and that user will see 404 page. Or it may be DayArchiveView, and user in New York will see another set of records.
I may be not understanding something, as last test in regressiontests.generic_views.dates even checks for this 404. But what is the way I should generate worldwide accessible permalinks?
Change History (7)
comment:1 Changed 3 years ago by prestontimmons
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
Changed 3 years ago by void
comment:3 Changed 3 years ago by ashleyjsands
- Resolution set to invalid
- Status changed from new to closed
comment:4 Changed 3 years ago by aaugustin
- Resolution invalid deleted
- Status changed from closed to reopened
comment:5 Changed 3 years ago by aaugustin
- Owner changed from nobody to aaugustin
- Status changed from reopened to new