Django

Code

Ticket #992 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] archive_month generic view leaves out last day of month

Reported by: ubernostrum Assigned to: jacob
Milestone: Component: Generic views
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Items published on the last day of a month won't be listed by the archive_month generic view (for example, at the moment the latest entry in the Django weblog is dated Nov. 30, and doesn't show up in the November archive of the Django blog); the view calculates the first and last day of the month, and uses those in a range lookup, but apparently this isn't inclusive (which is contrary to what the DB API docs claim). The view needs to use the first day of the next month as its last day instead.

Attachments

date_based.diff (0.8 kB) - added by ubernostrum on 12/04/05 09:35:07.
Patch to use first day of next month instead of last day of month
date_based.2.diff (0.9 kB) - added by ubernostrum on 12/04/05 09:50:06.
New patch that doesn't hate the month of November
date_based.3.diff (0.9 kB) - added by ubernostrum on 12/04/05 10:03:20.
It works this time. Testing is our friend.

Change History

12/04/05 09:35:07 changed by ubernostrum

  • attachment date_based.diff added.

Patch to use first day of next month instead of last day of month

12/04/05 09:50:06 changed by ubernostrum

  • attachment date_based.2.diff added.

New patch that doesn't hate the month of November

12/04/05 09:52:06 changed by ubernostrum

Actually... that's two boneheaded blunders in as many attempts. I'm going to grab a few hours of sleep, and then do this right.

12/04/05 10:03:20 changed by ubernostrum

  • attachment date_based.3.diff added.

It works this time. Testing is our friend.

12/07/05 03:45:23 changed by Esaj <jason at jasondavies.com>

  • summary changed from archive_month generic view leaves out last day of month to [patch] archive_month generic view leaves out last day of month.

12/08/05 19:55:54 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [1571]) Fixed #992 -- Fixed bug in archive_month generic view leaving out the last day of the month. Thanks, ubernostrum


Add/Change #992 ([patch] archive_month generic view leaves out last day of month)




Change Properties
Action