mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #2050 -- Fixed raw_id_admin display in admin. Thanks, Christopher Lenz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -143,9 +143,9 @@ class AdminBoundField(object): | ||||
|             return self._display | ||||
|         except AttributeError: | ||||
|             if isinstance(self.field.rel, models.ManyToOneRel): | ||||
|                 self._display = getattr(self.original, self.field.attname) | ||||
|                 self._display = getattr(self.original, self.field.name) | ||||
|             elif isinstance(self.field.rel, models.ManyToManyRel): | ||||
|                 self._display = ", ".join([str(obj) for obj in getattr(self.original, self.field.attname).all()]) | ||||
|                 self._display = ", ".join([str(obj) for obj in getattr(self.original, self.field.name).all()]) | ||||
|             return self._display | ||||
|  | ||||
|     def __repr__(self): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user