Ticket #4094: databrowse.diff
File databrowse.diff, 2.8 KB (added by , 16 years ago) |
---|
-
django/contrib/databrowse/plugins/calendars.py
39 39 easy_instance_field.model.url(), 40 40 plugin_name, easy_instance_field.field.name, 41 41 d.year, 42 datetime_safe.new_date(d). strftime('%b').lower(),42 datetime_safe.new_date(d).month, 43 43 d.day))] 44 44 45 45 def model_view(self, request, model_databrowse, url): … … 75 75 elif month is not None: 76 76 return date_based.archive_month(request, year, month, queryset, field.name, 77 77 template_name='databrowse/calendar_month.html', allow_empty=False, allow_future=True, 78 extra_context=extra_context )78 extra_context=extra_context, month_format='%m') 79 79 elif year is not None: 80 80 return date_based.archive_year(request, year, queryset, field.name, 81 81 template_name='databrowse/calendar_year.html', allow_empty=False, allow_future=True, -
django/contrib/databrowse/templates/databrowse/calendar_month.html
6 6 7 7 <div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../">Calendars</a> / <a href="../../">By {{ field.verbose_name }}</a> / <a href="../">{{ month.year }}</a> / {{ month|date:"F" }}</div> 8 8 9 <h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural|escape }}{% else %}{{ model.verbose_name|escape }}{% endif %} with {{ field.verbose_name }} on {{ day|date:"F Y" }}</h1>9 <h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural|escape }}{% else %}{{ model.verbose_name|escape }}{% endif %} with {{ field.verbose_name }} in {{ month|date:"F Y" }}</h1> 10 10 11 11 <ul class="objectlist"> 12 12 {% for object in object_list %} -
django/contrib/databrowse/templates/databrowse/calendar_year.html
10 10 11 11 <ul class="objectlist"> 12 12 {% for month in date_list %} 13 <li class="{% cycle 'odd' 'even' %}"><a href="{{ month|date:" M"|lower}}/">{{ month|date:"F" }}</a></li>13 <li class="{% cycle 'odd' 'even' %}"><a href="{{ month|date:"n" }}/">{{ month|date:"F" }}</a></li> 14 14 {% endfor %} 15 15 </ul> 16 16