Ticket #13883: options.py.diff
File options.py.diff, 1.1 KB (added by , 14 years ago) |
---|
-
django/contrib/admin/options.py
676 676 return HttpResponseRedirect(post_url_continue % pk_value) 677 677 678 678 if request.POST.has_key("_popup"): 679 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ 679 if hasattr(self, 'list_grouping') and self.list_grouping: 680 grp = escape(getattr(obj, self.list_grouping)) 681 else: 682 grp = '' 683 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s", "%s");</script>' % \ 680 684 # escape() calls force_unicode. 681 (escape(pk_value), escape(obj) ))685 (escape(pk_value), escape(obj), grp)) 682 686 elif request.POST.has_key("_addanother"): 683 687 self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name))) 684 688 return HttpResponseRedirect(request.path)