#10890: generic views archive_week and archive_day should have next/previous as Template Context ------------------------------------+--------------------------------------- Reporter: ee_lars | Owner: nobody Status: new | Milestone: Component: Generic views | Version: SVN Resolution: | Keywords: generic views date_based archive_day archive_week Stage: Unreviewed | Has_patch: 1 Needs_docs: 0 | Needs_tests: 1 Needs_better_patch: 0 | ------------------------------------+--------------------------------------- Changes (by palewire):
* has_patch: 0 => 1 * needs_tests: 0 => 1 Comment: I've attached a patch that tries to tackle the issue. One complication: There isn't a week attribute on datetime objects, or at least I'm not aware of it. Typically, I use dt.isocalendar()[1] to get week numbers. But that's a pretty big hassle to do in your templates, so I'm not sure that just passing out a datetime object, as is done with the other date_based generic views, will work here. If you check out my patch, what I tried was passing out dictionaries instead. Each with a 'year' and 'week' attribute that contains integers, and a 'date' key that hooks you up with the datetime object, if you happen to want that as well. Dumb idea? -- Ticket URL: <http://code.djangoproject.com/ticket/10890#comment:2> Django <http://code.djangoproject.com/> 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 django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---