user = authenticate(username=username, password=password)
if user:
return HttpResponse('success')
else:
return HttpResponse('fail')
通过身份验证时,网络将显示“成功”,但是数据库中auth_user的字段“ last_login”仍然为“空”
|id |password|last_login|is_superuser|fitst_name|last_name|email|is_staff|is_active|
| <null> |
我想在登录时更新该字段,该如何解决?