#9954: admin change list: list_filter section breaks when using named groups in
the choices field option
--------------------------------------------------------------------+-------
 Reporter:  ramiro                                                  |       
Owner:  ramiro    
   Status:  new                                                     |   
Milestone:            
Component:  django.contrib.admin                                    |     
Version:  SVN       
 Keywords:  liste_filter choices nested option gropus named tuples  |       
Stage:  Unreviewed
Has_patch:  0                                                       |  
--------------------------------------------------------------------+-------
 An user tried to reopen #4412 reporting this with the following (fixed)
 example:

 {{{
 #!python
 #models.py
 from django.db import models

 ITEM_TREE = (
    ('Outer 1', (
            ('inner1', 'Inner 1'),
            ('inner2', 'Inner 2'),
        )
    ),
 )

 class Item(models.Model):
     name = models.CharField(max_length=60)
     category = models.CharField("Item Category", max_length=20,
 choices=ITEM_TREE)
 }}}

 {{{
 #!python

 # admin.py

 from t9954.models import Item
 from django.contrib import admin

 class ItemAdmin(admin.ModelAdmin):
     list_display = ('name', 'category',)
     list_filter = ('category',)

 admin.site.register(Item, ItemAdmin)
 }}}

 when going to /admin/t9954/item/ the filter section shows:

   http://imagenes.zarate.net.ve/varias/djangobug.png

 I've already fixed this and I'm working on adding a test to the
 model_views regression tests, will post a patch soon.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9954>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to