Ticket #1302: date_based.diff
File date_based.diff, 967 bytes (added by , 19 years ago) |
---|
-
date_based.py
95 95 Templates: ``<app_label>/<module_name>_archive_month`` 96 96 Context: 97 97 month: 98 this month 98 (date) this month 99 next_month: 100 (date) the next day, or None if the next month would be a future date 101 last_month: 102 (date) the next month 99 103 object_list: 100 104 list of objects published in the given month 101 105 """ … … 126 130 c = DjangoContext(request, { 127 131 'object_list': object_list, 128 132 'month': date, 133 'next_month' : (last_day < datetime.date.today()) and (last_day + datetime.timedelta(days=1)) or None, 134 'previous_month' : first_day - datetime.timedelta(days=1), 129 135 }, context_processors) 130 136 for key, value in extra_context.items(): 131 137 if callable(value):