summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Rosner <brosner@gmail.com>2008-08-31 21:24:33 +0000
committerBrian Rosner <brosner@gmail.com>2008-08-31 21:24:33 +0000
commitab13303ea44c51f09ccd26ddaee485ddf9c9b1d4 (patch)
tree74cf06650a8982cbcb479e53d7f87b90fbbfcd99
parentd5119969012aa69b9b4ef345c7e0beb7d890509d (diff)
Fixed #8433 -- Deal with the add user popup on models that foreign key 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
-rw-r--r--django/contrib/auth/admin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/auth/admin.py b/django/contrib/auth/admin.py
index dfd7f37fac..1e4c480fb9 100644
--- a/django/contrib/auth/admin.py
+++ b/django/contrib/auth/admin.py
@@ -53,6 +53,8 @@ class UserAdmin(admin.ModelAdmin):
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)