Ticket #4094: databrowse2011.diff
File databrowse2011.diff, 2.8 KB (added by , 14 years ago) |
---|
-
django/contrib/databrowse/plugins/calendars.py
38 38 easy_instance_field.model.url(), 39 39 plugin_name, easy_instance_field.field.name, 40 40 str(d.year), 41 datetime_safe.new_date(d). strftime('%b').lower(),41 datetime_safe.new_date(d).month, 42 42 d.day))] 43 43 44 44 def model_view(self, request, model_databrowse, url): … … 70 70 if day is not None: 71 71 return date_based.archive_day(request, year, month, day, queryset, field.name, 72 72 template_name='databrowse/calendar_day.html', allow_empty=False, allow_future=True, 73 extra_context=extra_context )73 extra_context=extra_context, month_format='%m') 74 74 elif month is not None: 75 75 return date_based.archive_month(request, year, month, queryset, field.name, 76 76 template_name='databrowse/calendar_month.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|date:"Y" }}</a> / {{ month|date:"F" }}</div> 8 8 9 <h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% endif %} with {{ field.verbose_name }} on {{ month|date:"F Y" }}</h1>9 <h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% 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