Django

Code

Ticket #1229 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] magic-removal: date-based generic views should all support allow_empty

Reported by: nick@efford.net Assigned to: jacob
Milestone: Component: Generic views
Version: magic-removal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

It would seem logical for all date-based generic views to support an allow_empty argument; however, it appears that only archive_index and archive_day support it. This patch, against magic-removal rev 1958, adds allow_empty to archive_year and archive_month.

I fixed this basically by copying the appropriate logic from archive_index and archive_day to the other two views. Cursory testing with archive_month suggests it works, but I may well have overlooked something...

Attachments

date_based.diff (2.4 kB) - added by nick@efford.net on 01/15/06 11:19:23.
Fixes date-based generic views to universally support allow_empty

Change History

01/15/06 11:19:23 changed by nick@efford.net

  • attachment date_based.diff added.

Fixes date-based generic views to universally support allow_empty

02/18/06 14:13:47 changed by adrian

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

(In [2337]) Fixed #1229 -- Added allow_empty argument to archive_year and archive_month date-based generic views


Add/Change #1229 ([patch] magic-removal: date-based generic views should all support allow_empty)




Change Properties
Action