Made raw_id_admin work with non-integer primary keys

git-svn-id: http://code.djangoproject.com/svn/django/trunk@790 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-10-06 14:43:07 +00:00
parent cb628c0cb7
commit 9fe02e6b65
1 changed files with 4 additions and 1 deletions

View File

@ -596,6 +596,9 @@ class ForeignKey(Field):
Field.__init__(self, **kwargs)
def get_manipulator_field_objs(self):
if self.rel.raw_id_admin:
return self.rel.get_related_field().get_manipulator_field_objs()
else:
return [formfields.IntegerField]
class ManyToManyField(Field):