Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit fb3994bdfc296701ed156adbba9e898e17fa1c03 1 parent a88c887
Brian Rosner authored March 05, 2008

Showing 1 changed file with 1 addition and 3 deletions. Show diff stats Hide diff stats

  1. 4  django/contrib/admin/options.py
4  django/contrib/admin/options.py
@@ -383,9 +383,7 @@ def save_add(self, request, model, form, formsets, post_url_continue):
383 383
                 post_url_continue += "?_popup=1"
384 384
             return HttpResponseRedirect(post_url_continue % pk_value)
385 385
         if request.POST.has_key("_popup"):
386  
-            if type(pk_value) is str: # Quote if string, so JavaScript doesn't think it's a variable.
387  
-                pk_value = '"%s"' % pk_value.replace('"', '\\"')
388  
-            return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \
  386
+            return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, "%s", "%s");</script>' % \
389 387
                 # escape() calls force_unicode.
390 388
                 (escape(pk_value), escape(new_object)))
391 389
         elif request.POST.has_key("_addanother"):

0 notes on commit fb3994b

Please sign in to comment.
Something went wrong with that request. Please try again.