Permalink
Browse files

Fixed #8433 -- Deal with the add user popup on models that foreign ke…

…y to User correctly. Thanks sorl for the report and fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8776 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent d511996 commit ab13303ea44c51f09ccd26ddaee485ddf9c9b1d4 @brosner brosner committed Aug 31, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/contrib/auth/admin.py
@@ -53,6 +53,8 @@ def add_view(self, request):
if "_addanother" in request.POST:
request.user.message_set.create(message=msg)
return HttpResponseRedirect(request.path)
+ elif '_popup' in request.REQUEST:
+ return self.response_add(request, new_user)
else:
request.user.message_set.create(message=msg + ' ' + ugettext("You may edit it again below."))
return HttpResponseRedirect('../%s/' % new_user.id)

0 comments on commit ab13303

Please sign in to comment.