Date-based views provide inappropriate dates for next_/previous_ day/month
|Reported by:||Owned by:||nobody|
|Severity:||Keywords:||date-based next previous|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The archive_month's and archive_day's next_* / previous_* are not appropriate, given the views are aware of the queryset. The simplistic +-1 day/month calculations should debatably go into a filter. But the real issue is that with allow_empty=False (which is the default), the current implementation will easily lead to 404 pages, rendering them rather useless. Not everybody publishes items every day, or every month for that matter.
The attached patch turns next_day / previous_day / next_month / previous_month into callables, so they will get lazily executed when used in the template. It depends on the patch in ticket #7153 to work.