﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
9954	admin change list: list_filter section breaks when using named groups in the choices field option	Ramiro Morales	Ramiro Morales	"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.


"		closed	contrib.admin	dev		duplicate	list_filter choices nested option gropus named tuples		Unreviewed	1	0	0	0	0	0
