I've built a simple date-based app that works fine through the admin
and all proper URLs resolve to the correct template and display the
correct data.
For the following problems, I reset the SQL for the app, ran 'syncdb'
and then ran it with 'runserver'. I added one object with a date and
time of today.
1. In the date_based.archive_index view, the 'date_list' object is
empty. It should have a date object for this year because there is,
of course, a post in the current year (2006). The docs for this extra
context variable state that this should contain: "all years that have
objects available according to queryset".
2. In the date_based.archive_month view, previous_month is set to the
previous month even though there are no objects in June. The docs say
that this is the expected behavior, but why? It seems to me to be
completely illogical to me because the usual use of next_month and
previous_month is to create links to archive_month views. How should
I work around this when the user is looking at the *true* last
month's worth of entries? Do we need {% if
previous_month_but_for_reals_this_time_please_i_really_mean_it %}?
3. In the date_based.archive_day view, I have the same issue with
"previous_day" as I do with previous_month. Why such tomfoolery?
Perhaps I'm off my rocker and am missing something obvious here?
Thanks in advance for any help/suggestions,
Tyson Tate
--
Tyson Tate
- CalPoly Graphic Design Student
- Work: Graphic Designer (CalPoly Library)
- Play: Mustang Band, CalPoly Triathlon Team, Kappa Kappa Psi (Iota Pi)