mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #3400 -- Support for lookup separator with list_filter admin option. Thanks to DrMeers and vitek_pliska for the patch!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -458,6 +458,11 @@ how both ``list_display`` and ``list_filter`` work::
|
||||
list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
|
||||
list_filter = ('is_staff', 'is_superuser')
|
||||
|
||||
Fields in ``list_filter`` can also span relations using the ``__`` lookup::
|
||||
|
||||
class UserAdminWithLookup(UserAdmin):
|
||||
list_filter = ('groups__name')
|
||||
|
||||
The above code results in an admin change list page that looks like this:
|
||||
|
||||
.. image:: _images/users_changelist.png
|
||||
|
||||
@@ -159,6 +159,8 @@ requests. These include:
|
||||
<cache_key_prefixing>` and :ref:`transformation
|
||||
<cache_key_transformation>` has been added to the cache API.
|
||||
|
||||
* Support for lookups spanning relations in admin's ``list_filter``.
|
||||
|
||||
.. _backwards-incompatible-changes-1.3:
|
||||
|
||||
Backwards-incompatible changes in 1.3
|
||||
|
||||
Reference in New Issue
Block a user