Ticket #889: trunk-admin_popup_str_fix.diff

File trunk-admin_popup_str_fix.diff, 840 bytes (added by Tom Tobin <korpios@…>, 19 years ago)

make form value of popup-added foreign items based on str (against r2306 of trunk)

  • contrib/admin/views/main.py

     
    418418                return HttpResponseRedirect(post_url_continue % pk_value)
    419419            if request.POST.has_key("_popup"):
    420420                return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \
    421                     (pk_value, repr(new_object).replace('"', '\\"')))
     421                    (pk_value, str(new_object).replace('"', '\\"')))
    422422            elif request.POST.has_key("_addanother"):
    423423                request.user.add_message(msg + ' ' + (_("You may add another %s below.") % opts.verbose_name))
    424424                return HttpResponseRedirect(request.path)
Back to Top