Ticket #16309: 16309-documentation-admin-list_filter.2.diff

File 16309-documentation-admin-list_filter.2.diff, 1.7 KB (added by Antti Kaihola, 13 years ago)

Mark both SimpleListFilter and FieldListFilter as "new in Django 1.4" instead of marking all of list_filter changed

  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index c0ff3c6..37849e4 100644
    a b subclass::  
    553553
    554554.. attribute:: ModelAdmin.list_filter
    555555
    556     .. versionchanged:: 1.4
    557 
    558556    Set ``list_filter`` to activate filters in the right sidebar of the change
    559557    list page of the admin, as illustrated in the following screenshot:
    560558
    subclass::  
    578576              class PersonAdmin(UserAdmin):
    579577                  list_filter = ('company__name',)
    580578
    581         * a class inheriting from :mod:`django.contrib.admin.SimpleListFilter`,
     579        * .. versionadded:: 1.4
     580
     581          a class inheriting from :mod:`django.contrib.admin.SimpleListFilter`,
    582582          which you need to provide the ``title`` and ``parameter_name``
    583583          attributes to and override the ``lookups`` and ``queryset`` methods,
    584584          e.g.::
    subclass::  
    592592                   title = _('decade born')
    593593
    594594                   # Parameter for the filter that will be used in the URL query.
    595                    parameter_name = 'decade'
     595t                   parameter_name = 'decade'
    596596
    597597                   def lookups(self, request, model_admin):
    598598                       """
    subclass::  
    661661                                        birthday__year__lte=1999).exists():
    662662                              yield ('90s', _('in the nineties'))
    663663
    664         * a tuple, where the first element is a field name and the second
     664        * .. versionadded:: 1.4
     665
     666          a tuple, where the first element is a field name and the second
    665667          element is a class inheriting from
    666668          :mod:`django.contrib.admin.FieldListFilter`, for example::
    667669
Back to Top