﻿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
31262	Support dictionaries in Field.choices for named groups.	Tom Forbes	nobody	"The Django documentation gives this example for creating named groups of choices:

{{{
MEDIA_CHOICES = [
    ('Audio', (
            ('vinyl', 'Vinyl'),
            ('cd', 'CD'),
        )
    ),
    ('Video', (
            ('vhs', 'VHS Tape'),
            ('dvd', 'DVD'),
        )
    ),
    ('unknown', 'Unknown'),
]
}}}

With Python 3.7 (and implicitly in CPython 3.6) dictionaries are ordered, meaning this syntax could be replaced by the cleaner and easier to parse:

{{{
{
    ""Audio"": (
         ('vinyl', 'Vinyl'),
         ('cd', 'CD'),
    ),
    ""Video"": (
        ('vhs', 'VHS Tape'),
        ('dvd', 'DVD'),
    ),
   ""unknown"": ""Unknown""
}
}}}

Once 3.7 is the lowest supported version we should document that this is supported, and ensure that it works correctly."	New feature	new	Database layer (models, ORM)	master	Normal				Accepted	0	0	0	0	1	0
