Fixed #8359 -- Add an admin log entry when creating a new user.

Patch from evan_schulz.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-08-23 21:45:36 +00:00
parent 712bb0dde7
commit aa78a05e69
1 changed files with 4 additions and 3 deletions

View File

@ -48,6 +48,7 @@ class UserAdmin(admin.ModelAdmin):
if form.is_valid():
new_user = form.save()
msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': 'user', 'obj': new_user}
self.log_addition(request, new_user)
if "_addanother" in request.POST:
request.user.message_set.create(message=msg)
return HttpResponseRedirect(request.path)