Ticket #2500: pk-popup-close.diff
File pk-popup-close.diff, 849 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/views/main.py
263 263 post_url_continue += "?_popup=1" 264 264 return HttpResponseRedirect(post_url_continue % pk_value) 265 265 if request.POST.has_key("_popup"): 266 # Quote if string, so JavaScript doesn't think it's a variable 267 if type(pk_value) == str: 268 pk_value = "'" + pk_value + "'" 266 269 return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \ 267 270 (pk_value, str(new_object).replace('"', '\\"'))) 268 271 elif request.POST.has_key("_addanother"):