﻿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
22537	Misleading documentation on choices for a model field	Mike Fogel	nobody	"The [https://docs.djangoproject.com/en/dev/ref/models/fields/#choices docs on the choices attribute for a model field] currently read ""The first element in each tuple is the actual value to be stored..."" 

This is all true and good for simple model fields, but for more complex ones where the python representation of the field value differs from that in the database, this is at best misleading. An example of this is the [https://docs.djangoproject.com/en/dev/howto/custom-model-fields/#writing-a-field-subclass 'hand' example of field subclassing] in the docs. For fields like this one, the first element of the model choices field is the python representation of the field value, not the actual value to be stored in the database.

I've implemented a [https://github.com/django/django/pull/2539/files pull request] that implements a minor documentation change clarifying this, and adds a test to the field subclassing to ensure this behavior is the blessed behavior."	Bug	closed	Documentation	1.6	Normal	fixed			Accepted	1	0	0	0	1	0
