﻿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
3265	queries for model fields with trailing underscores do not work	code.djangoproject@…	nobody	"I've come to the conclusion suffixing an attribute in a model with an underscore is problematic and probably best avoided. It is common practice to suffix reserved keywords with an underscore e.g. select_, print_, etc_ *but* not on an attribute name. These types of attributes should probably cause an exception when trying to syncdb OR the following is a bug:

{{{
CharField_ = models.CharField(maxlength=64, unique=True)   # exception: TypeError: Cannot resolve keyword 'CharField' into field
CharField_ = models.CharField(maxlength=64, unique=False)  # everything works fine and no problems are apparent at first
}}}

I've discovered the exception inside the Django admin when trying to submit a unique value in the field. It doesn't work if I provide a unique value *but* if the options (blank=True and null=True) is also provided, I can at most submit up to one entry with no value for the field. Every submission thereafter will be sure to cause an exception."	defect	closed	Database layer (models, ORM)		trivial	fixed			Accepted	0	0	0	0	0	0
