Ticket #1282: archive_today.diff

File archive_today.diff, 789 bytes (added by Jannis Leidel <jl@…>, 18 years ago)

make archive_today() respect month_format

  • django/views/generic/date_based.py

     
    272272            c[key] = value
    273273    return HttpResponse(t.render(c), mimetype=mimetype)
    274274
    275 def archive_today(request, **kwargs):
     275def archive_today(request, month_format='%b', **kwargs):
    276276    """
    277277    Generic daily archive view for today. Same as archive_day view.
    278278    """
    279279    today = datetime.date.today()
    280280    kwargs.update({
    281281        'year': str(today.year),
    282         'month': today.strftime('%b').lower(),
     282        'month': today.strftime(month_format).lower(),
    283283        'day': str(today.day),
    284284    })
    285285    return archive_day(request, **kwargs)
Back to Top