﻿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
4641	newforms-admin: fix for displaying field str() value next to raw_id fields	Matthew Flanagan <mattimustang@…>	xian	"Hi, here's a simple fix so that newforms-admin displays the current str() representation of a field next to its raw_id input widget.

regards

matthew

{{{
Index: django/contrib/admin/widgets.py
===================================================================
--- django/contrib/admin/widgets.py     (revision 5505)
+++ django/contrib/admin/widgets.py     (working copy)
@@ -65,9 +65,9 @@
         output.append('<a href=""%s%s"" class=""related-lookup"" id=""lookup_id_%s"" onclick=""return showRelatedObjectLookupPopup(this);""> ' % \
             (related_url, url, name))
         output.append('<img src=""%simg/admin/selector-search.gif"" width=""16"" height=""16"" alt=""Lookup""></a>' % settings.ADMIN_MEDIA_PREFIX)
+        if value:
+            output.append('&nbsp;<strong>%s</strong>' % self.rel.to.objects.get(id=value))
         return u''.join(output)
-        #if self.change: # TODO
-            #output.append('&nbsp;<strong>TODO</strong>')

 class RelatedFieldWidgetWrapper(object):
     """"""
}}}"		closed	contrib.admin	newforms-admin		fixed	nfa-blocker		Ready for checkin	1	0	0	0	0	0
