Fixed #2500 -- Fixed bug in admin related-object pop-up window when using a primary key value that isn't an integer. Thanks, Gary Wilson and deryck@samba.org
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
23964a7b9a
commit
4805675f9d
|
@ -263,7 +263,7 @@ def add_stage(request, app_label, model_name, show_delete=False, form_url='', po
|
||||||
post_url_continue += "?_popup=1"
|
post_url_continue += "?_popup=1"
|
||||||
return HttpResponseRedirect(post_url_continue % pk_value)
|
return HttpResponseRedirect(post_url_continue % pk_value)
|
||||||
if request.POST.has_key("_popup"):
|
if request.POST.has_key("_popup"):
|
||||||
return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \
|
return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %r, "%s");</script>' % \
|
||||||
(pk_value, str(new_object).replace('"', '\\"')))
|
(pk_value, str(new_object).replace('"', '\\"')))
|
||||||
elif request.POST.has_key("_addanother"):
|
elif request.POST.has_key("_addanother"):
|
||||||
request.user.message_set.create(message=msg + ' ' + (_("You may add another %s below.") % opts.verbose_name))
|
request.user.message_set.create(message=msg + ' ' + (_("You may add another %s below.") % opts.verbose_name))
|
||||||
|
|
Loading…
Reference in New Issue