﻿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
972	better explain choices usage in the model docs	radek	Jacob	"When using choices option as documented in http://www.djangoproject.com/documentation/model_api/#general-field-options
it is important to define the choices outside of the class definition (not inside). In the wrong way validation raises error.

WRONG:
{{{
class Website(meta.Model):
    ""websites""
    TYPE_CHOICES = (
        ('1','Private'),
        ('2','Phorum'),
    )

    ...
    type = meta.CharField('Type', maxlength=200, blank = True, choices=TYPE_CHOICES)

}}}
RIGHT:
{{{
TYPE_CHOICES = (
    ('1','Private'),
    ('2','Phorum'),
)

class Website(meta.Model):
    ""websites""
    ...
    type = meta.CharField('Type', maxlength=200, blank = True, choices=TYPE_CHOICES)
}}}

Please, improve docs correspondingly."	defect	closed	Documentation		normal	fixed			Unreviewed	0	0	0	0	0	0
