﻿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
3601	ImageField with db_column results in KeyError in Admin Edit	brice@…	hakejam	"Hi,
I seem to have stumbled upon a bug with ImageField.

Here are the steps to reproduce :
 * define a model with an ImageField that has a db_column attribute that is different from his attribute name
 * add an object of this class using the admin
 * try to access the change_form of this object again and you should see a KeyError

If I understand correctly, the problem is located at line 136 of django/contrib/admin/view/main.py where we try to access self.original.__dict__[self.field.column], which doesn't exist.
My patch simply return self.original.__dict__[self.field.attname] instead.
Please note that this hasn't been extensively tested and I really don't have the needed time to add unit tests."		closed	contrib.admin	dev		wontfix	ImageField		Accepted	1	0	1	0	0	0
