diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-03-05 03:56:20 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-03-05 03:56:20 +0000 |
| commit | fb3994bdfc296701ed156adbba9e898e17fa1c03 (patch) | |
| tree | 667d31f988795c47860f04d1eefd5dfca20de92d | |
| parent | a88c887631d551aca6176cd31b8a97a15fad8665 (diff) | |
newforms-admin: Fixed #6100 -- Related field popup window now closes properly after saving. Thanks oggie_rob and Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/admin/options.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 6c33b6e15e..ab3291834d 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -383,9 +383,7 @@ class ModelAdmin(BaseModelAdmin): post_url_continue += "?_popup=1" return HttpResponseRedirect(post_url_continue % pk_value) if request.POST.has_key("_popup"): - if type(pk_value) is str: # Quote if string, so JavaScript doesn't think it's a variable. - pk_value = '"%s"' % pk_value.replace('"', '\\"') - return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \ + return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \ # escape() calls force_unicode. (escape(pk_value), escape(new_object))) elif request.POST.has_key("_addanother"): |
