Ticket #11683: 11683-response_add-dismissAddAnotherPopup-mimetype.diff

File 11683-response_add-dismissAddAnotherPopup-mimetype.diff, 807 bytes (added by rlaager@…, 15 years ago)
  • django/contrib/admin/options.py

     
    607607        if request.POST.has_key("_popup"):
    608608            return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \
    609609                # escape() calls force_unicode.
    610                 (escape(pk_value), escape(obj)))
     610                (escape(pk_value), escape(obj)), mimetype="text/html")
    611611        elif request.POST.has_key("_addanother"):
    612612            self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name)))
    613613            return HttpResponseRedirect(request.path)
Back to Top