Fixed #7775 -- Removed some duplicated code from the admin login sequence. Thanks to Mnewman for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8006 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6db9fd0116
commit
6c4c60b14a
|
@ -249,9 +249,6 @@ class AdminSite(object):
|
||||||
else:
|
else:
|
||||||
if user.is_active and user.is_staff:
|
if user.is_active and user.is_staff:
|
||||||
login(request, user)
|
login(request, user)
|
||||||
# TODO: set last_login with an event.
|
|
||||||
user.last_login = datetime.datetime.now()
|
|
||||||
user.save()
|
|
||||||
if request.POST.has_key('post_data'):
|
if request.POST.has_key('post_data'):
|
||||||
post_data = _decode_post_data(request.POST['post_data'])
|
post_data = _decode_post_data(request.POST['post_data'])
|
||||||
if post_data and not post_data.has_key(LOGIN_FORM_KEY):
|
if post_data and not post_data.has_key(LOGIN_FORM_KEY):
|
||||||
|
|
Loading…
Reference in New Issue