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:
parent
712bb0dde7
commit
aa78a05e69
|
@ -48,6 +48,7 @@ class UserAdmin(admin.ModelAdmin):
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
new_user = form.save()
|
new_user = form.save()
|
||||||
msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': 'user', 'obj': new_user}
|
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:
|
if "_addanother" in request.POST:
|
||||||
request.user.message_set.create(message=msg)
|
request.user.message_set.create(message=msg)
|
||||||
return HttpResponseRedirect(request.path)
|
return HttpResponseRedirect(request.path)
|
||||||
|
|
Loading…
Reference in New Issue