#2386: [patch]previous_month and previous_day are non-empty even if there are no
objects in previous months/days
------------------------------------------------------+---------------------
 Reporter:  Tyson Tate <[EMAIL PROTECTED]>     |        Owner:  jacob 
     Type:  defect                                    |       Status:  closed
 Priority:  normal                                    |    Milestone:        
Component:  Generic views                             |      Version:  SVN   
 Severity:  normal                                    |   Resolution:  fixed 
 Keywords:  previous_month previous_day genericviews  |  
------------------------------------------------------+---------------------
Changes (by Pete Crosier):

 * cc: [EMAIL PROTECTED] (added)
  * resolution:  => fixed
  * status:  new => closed
  * summary:  previous_month and previous_day are non-empty even if there
              are no objects in previous months/days =>
              [patch]previous_month and previous_day are non-
              empty even if there are no objects in previous
              months/days

Comment:

 I've put together a patch that I think does what you want.
 
 {{{ archive_month }}} now returns a {{{ next_month }}} and {{{
 previous_month }}} only for months with objects, otherwise it returns {{{
 None }}}. This takes into account the specified year only, which seems
 logical (to me).
 
 {{{ archive_day }}} now returns a {{{ next_day }}} and {{{ previous_day
 }}} only for days with objects, otherwise it returns {{{ None }}}. This
 takes into account the specified month only, which seems logical (again,
 to me).
 
 Criticism fully appreciated, and please un-fix this if I shouldn't have
 marked it so :)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2386>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to