diff options
| author | Honza Král <honza.kral@gmail.com> | 2010-11-21 19:29:15 +0000 |
|---|---|---|
| committer | Honza Král <honza.kral@gmail.com> | 2010-11-21 19:29:15 +0000 |
| commit | dc334a2ba8dbf5134d65c97fea2785c3b2294ef5 (patch) | |
| tree | ea647738399bee77ef2578231906d95a67fe3c96 /tests/regressiontests/admin_views/models.py | |
| parent | 274aba3b9b8c48012a2d842790cb3df04dc9ae80 (diff) | |
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
Diffstat (limited to 'tests/regressiontests/admin_views/models.py')
| -rw-r--r-- | tests/regressiontests/admin_views/models.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py index ee0f5d51a1..61ca33904c 100644 --- a/tests/regressiontests/admin_views/models.py +++ b/tests/regressiontests/admin_views/models.py @@ -90,6 +90,14 @@ class ArticleInline(admin.TabularInline): class ChapterInline(admin.TabularInline): model = Chapter +class ChapterXtra1Admin(admin.ModelAdmin): + list_filter = ('chap', + 'chap__title', + 'chap__book', + 'chap__book__name', + 'chap__book__promo', + 'chap__book__promo__name',) + class ArticleAdmin(admin.ModelAdmin): list_display = ('content', 'date', callable_year, 'model_year', 'modeladmin_year') list_filter = ('date',) @@ -168,7 +176,7 @@ class Thing(models.Model): return self.title class ThingAdmin(admin.ModelAdmin): - list_filter = ('color',) + list_filter = ('color', 'color__warm', 'color__value') class Fabric(models.Model): NG_CHOICES = ( @@ -646,7 +654,7 @@ admin.site.register(CyclicTwo) # contrib.admin.util's get_deleted_objects function. admin.site.register(Book, inlines=[ChapterInline]) admin.site.register(Promo) -admin.site.register(ChapterXtra1) +admin.site.register(ChapterXtra1, ChapterXtra1Admin) admin.site.register(Pizza, PizzaAdmin) admin.site.register(Topping) admin.site.register(Album) |
