Ticket #4094: databrowse2011.diff

File databrowse2011.diff, 2.8 KB (added by Dario Ocles, 14 years ago)

patch updated to the last trunk

  • django/contrib/databrowse/plugins/calendars.py

     
    3838                easy_instance_field.model.url(),
    3939                plugin_name, easy_instance_field.field.name,
    4040                str(d.year),
    41                 datetime_safe.new_date(d).strftime('%b').lower(),
     41                datetime_safe.new_date(d).month,
    4242                d.day))]
    4343
    4444    def model_view(self, request, model_databrowse, url):
     
    7070        if day is not None:
    7171            return date_based.archive_day(request, year, month, day, queryset, field.name,
    7272                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')
    7474        elif month is not None:
    7575            return date_based.archive_month(request, year, month, queryset, field.name,
    7676                template_name='databrowse/calendar_month.html', allow_empty=False, allow_future=True,
  • django/contrib/databrowse/templates/databrowse/calendar_month.html

     
    66
    77<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>
    88
    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>
    1010
    1111<ul class="objectlist">
    1212{% for object in object_list %}
  • django/contrib/databrowse/templates/databrowse/calendar_year.html

     
    1010
    1111<ul class="objectlist">
    1212{% 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>
    1414{% endfor %}
    1515</ul>
    1616
Back to Top