You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With enabled timezone support (USE_TZ = True in settings), Submission.get_absolute_url returns url with date in UTC but SubmissionArchiveDetailView (which inherits from DateDetailView which inherits from DateMixin) returns Submission instance based on publish_date in current time zone.
It can happen that link from archive page <newsletter_slug:s>/archive/ leads to non existing url, with day later or earlier by one.
In answer to ticket 18794 using DateField instead of DateTimeField or overriding get_object is suggested.
With enabled timezone support (
USE_TZ = True
in settings),Submission.get_absolute_url
returns url with date in UTC butSubmissionArchiveDetailView
(which inherits fromDateDetailView
which inherits fromDateMixin
) returnsSubmission
instance based onpublish_date
in current time zone.It can happen that link from archive page
<newsletter_slug:s>/archive/
leads to non existing url, with day later or earlier by one.In answer to ticket 18794 using
DateField
instead ofDateTimeField
or overridingget_object
is suggested.This is also related to documentation of
DateMixin
and documentation of timezones troubleshooting (item 3.).The text was updated successfully, but these errors were encountered: