Ticket #13883: options.py-corrected.diff
File options.py-corrected.diff, 1.1 KB (added by , 13 years ago) |
---|
-
django/contrib/admin/options.py
738 738 return HttpResponseRedirect(post_url_continue % pk_value) 739 739 740 740 if "_popup" in request.POST: 741 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ 741 if hasattr(self, 'list_grouping') and self.list_grouping: 742 grp = escape(getattr(obj, self.list_grouping)) 743 else: 744 grp = '' 745 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s", "%s");</script>' % \ 742 746 # escape() calls force_unicode. 743 (escape(pk_value), escape js(obj)))747 (escape(pk_value), escape(obj), grp)) 744 748 elif "_addanother" in request.POST: 745 749 self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name))) 746 750 return HttpResponseRedirect(request.path)