Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong submission archive urls when timezones are enabled #74

Closed
jkuczm opened this issue Jun 10, 2013 · 1 comment
Closed

Wrong submission archive urls when timezones are enabled #74

jkuczm opened this issue Jun 10, 2013 · 1 comment
Labels
Milestone

Comments

@jkuczm
Copy link
Contributor

jkuczm commented Jun 10, 2013

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.

This is also related to documentation of DateMixin and documentation of timezones troubleshooting (item 3.).

@dokterbob
Copy link
Collaborator

First: implement test demonstrating this issue.

Then: fix issue according to suggested solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants