Index: django/contrib/admin/media/js/admin/RelatedObjectLookups.js
===================================================================
--- django/contrib/admin/media/js/admin/RelatedObjectLookups.js	(revision 15922)
+++ django/contrib/admin/media/js/admin/RelatedObjectLookups.js	(working copy)
@@ -55,7 +55,7 @@
 function showAddAnotherPopup(triggeringLink) {
     var name = triggeringLink.id.replace(/^add_/, '');
     name = id_to_windowname(name);
-    href = triggeringLink.href
+    href = triggeringLink.href;
     if (href.indexOf('?') == -1) {
         href += '?_popup=1';
     } else {
@@ -66,18 +66,57 @@
     return false;
 }
 
-function dismissAddAnotherPopup(win, newId, newRepr) {
+// To show edit popup window of selected item.
+function showChangeCurrentPopup(triggeringLink, element_id) {
+    element = document.getElementById(element_id);
+    var name = triggeringLink.id.replace(/^change_/, '');
+    name = id_to_windowname(name);
+    href = triggeringLink.href;
+   
+    if (href.indexOf('?') == -1) {
+        href += '?_popup=1';
+    } else {
+        href  += '&_popup=1';
+    }
+    var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
+    win.focus();
+    return false;
+}
+
+function dismissAddAnotherPopup(win, newId, newRepr, triggeringLink) {
     // newId and newRepr are expected to have previously been escaped by
     // django.utils.html.escape.
     newId = html_unescape(newId);
     newRepr = html_unescape(newRepr);
     var name = windowname_to_id(win.name);
     var elem = document.getElementById(name);
+   // create a object of changeIcon and ChangeLink.
+    var icon_elem = document.getElementById('change_icon_' + name);
+    var acr_elem = document.getElementById('change_' + name);
     if (elem) {
         if (elem.nodeName == 'SELECT') {
             var o = new Option(newRepr, newId);
             elem.options[elem.options.length] = o;
             o.selected = true;
+            // To hide and visible change_icon image according to number of selection item.
+	    	var count = 0;
+	    	for (i=0; i<elem.options.length; i++) {
+                if (elem.options[i].selected) {
+                        count++;
+                }
+                if (count > 1){
+                        break;
+                }
+            }
+           	if (count == 1){
+                	icon_elem.style.display = '';
+					acr_elem.href = triggeringLink + newId + '/';
+		   	}
+		   	else{
+					icon_elem.style.display = 'none';
+					acr_elem.href = triggeringLink;
+	  		}
+
         } else if (elem.nodeName == 'INPUT') {
             if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) {
                 elem.value += ',' + newId;
@@ -94,3 +133,67 @@
     }
     win.close();
 }
+
+// To close popup edit page.
+function dismissChangeCurrentPopup(win, Id, newRepr) {
+    // Id and newRepr are expected to have previously been escaped by
+    // django.utils.html.escape.
+
+    Id = html_unescape(Id);
+    newRepr = html_unescape(newRepr);
+
+    var name = windowname_to_id(win.name);
+    var elem = document.getElementById(name);
+
+    if (elem) {
+        if (elem.nodeName == 'SELECT') {
+	     for(i=0; i < elem.options.length; i++)
+	     {
+		if(elem.options[i].value == Id)
+		{
+			elem.options[i].text = newRepr;
+			elem.options[i].selected = true;
+		}
+	     }
+
+        } else if (elem.nodeName == 'INPUT') {
+            elem.value = Id;
+        }
+    } else {
+        var toId = name + "_to";
+        elem = document.getElementById(toId);
+        var o = new Option(newRepr, Id);
+        SelectBox.add_to_cache(toId, o);
+        SelectBox.redisplay(toId);
+    }
+    win.close();
+}
+
+// To hide and visible change_icon image according to number of selection item.
+function onChangeValue(element, triggeringLink, anchor_id, icon_id)
+{
+	var i;
+  	var count = 0;
+	var icon_elem = document.getElementById(icon_id);
+	var acr_elem = document.getElementById(anchor_id);
+
+  	for (i=0; i<element.options.length; i++) {
+    		if (element.options[i].selected) {      			
+      			count++;
+    		}
+		if (count > 1){
+			icon_elem.style.display = 'none';
+			acr_elem.href = triggeringLink;
+			return;
+		}
+  	}
+
+	if (!element.value){
+		icon_elem.style.display = 'none';
+		acr_elem.href = triggeringLink;
+	}
+	else{	
+		icon_elem.style.display = '';
+		acr_elem.href = triggeringLink + element.value + '/';
+	}
+}
\ No newline at end of file
Index: django/contrib/admin/options.py
===================================================================
--- django/contrib/admin/options.py	(revision 15922)
+++ django/contrib/admin/options.py	(working copy)
@@ -25,6 +25,7 @@
 from django.utils.translation import ugettext as _
 from django.utils.translation import ungettext
 from django.utils.encoding import force_unicode
+from django.core.urlresolvers import reverse, NoReverseMatch
 
 HORIZONTAL, VERTICAL = 1, 2
 # returns the <ul> class for a given radio_admin field
@@ -724,9 +725,16 @@
             return HttpResponseRedirect(post_url_continue % pk_value)
 
         if "_popup" in request.POST:
-            return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \
+            info = (opts.app_label, opts.object_name.lower())
+            # To add URL for Change existings record.
+            try:
+                related_info = (self.admin_site.name,) + info
+                change_url = reverse('%sadmin_%s_%s_' % related_info)
+            except NoReverseMatch:
+                change_url = '../../../%s/%s/' % info
+            return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s", "%s");</script>' % \
                 # escape() calls force_unicode.
-                (escape(pk_value), escapejs(obj)))
+                (escape(pk_value), escapejs(obj), change_url))
         elif "_addanother" in request.POST:
             self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name)))
             return HttpResponseRedirect(request.path)
@@ -770,6 +778,11 @@
         elif "_addanother" in request.POST:
             self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(verbose_name)))
             return HttpResponseRedirect("../add/")
+        # To close popup edit window.
+        elif "_popup" in request.POST:
+            return HttpResponse('<script type="text/javascript">opener.dismissChangeCurrentPopup(window, "%s", "%s");</script>' % \
+                # escape() calls force_unicode.
+                (escape(pk_value), escape(obj)))
         else:
             self.message_user(request, msg)
             # Figure out where to redirect. If the user has change permission,
Index: django/contrib/admin/widgets.py
===================================================================
--- django/contrib/admin/widgets.py	(revision 15922)
+++ django/contrib/admin/widgets.py	(working copy)
@@ -232,18 +232,47 @@
         rel_to = self.rel.to
         info = (rel_to._meta.app_label, rel_to._meta.object_name.lower())
         try:
-            related_url = reverse('admin:%s_%s_add' % info, current_app=self.admin_site.name)
+            add_url = reverse('admin:%s_%s_add' % info, current_app=self.admin_site.name)
         except NoReverseMatch:
-            info = (self.admin_site.root_path, rel_to._meta.app_label, rel_to._meta.object_name.lower())
-            related_url = '%s%s/%s/add/' % info
+            add_url = '%s%s/%s/add/' % ((self.admin_site.root_path,) + info)
+        try:
+            change_url = reverse('admin:%s_%s' % info)
+        except NoReverseMatch:
+            change_url = '../../../%s/%s/' % info
         self.widget.choices = self.choices
-        output = [self.widget.render(name, value, *args, **kwargs)]
+
+        output = []
         if self.can_add_related:
             # TODO: "id_" is hard-coded here. This should instead use the correct
             # API to determine the ID dynamically.
             output.append(u'<a href="%s" class="add-another" id="add_id_%s" onclick="return showAddAnotherPopup(this);"> ' % \
-                (related_url, name))
-            output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="%s"/></a>' % (settings.ADMIN_MEDIA_PREFIX, _('Add Another')))
+                (add_url, name))
+            output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="%s"/></a>' % \
+                (settings.ADMIN_MEDIA_PREFIX, _('Add Another')))
+
+        # To put a changeLink, changeLinkIcon in selecion widget and to add id of selected record in ChangeLink.
+        display = 'None'
+        id = ''
+        if value and (isinstance(value, list) and len(value) == 1) or (isinstance(value, int)):
+            display = ''
+            if isinstance(value, list):
+                id = '%s/' % (value[0],)
+            else:
+                id = '%s/' % value
+
+        if self.can_add_related:
+            if kwargs.get('attrs', False):
+                kwargs['attrs'].update({"onchange": "onChangeValue(this, '%s', 'change_id_%s', 'change_icon_id_%s')" % (change_url, name, name)})
+
+            output.append(u'''<a href="%s%s" class="change-current" id="change_id_%s" onclick="return showChangeCurrentPopup(this, 'id_%s');"> ''' % \
+                (change_url, id, name, name))
+            output.append(u'<img src="%simg/admin/icon_changelink.gif" width="10" height="10" alt="%s" id="change_icon_id_%s" style="display:%s;"/></a>' % \
+                (settings.ADMIN_MEDIA_PREFIX, _('Edit'), name, display))
+
+        # The widget rendering is here because we can add extra attrs
+        # at any time, so the rendering has to be last.
+        output.insert(0, self.widget.render(name, value, *args, **kwargs))
+
         return mark_safe(u''.join(output))
 
     def build_attrs(self, extra_attrs=None, **kwargs):
