diff --git a/polls/views/__pycache__/user.cpython-38.pyc b/polls/views/__pycache__/user.cpython-38.pyc index 086d6a7..3a72839 100644 Binary files a/polls/views/__pycache__/user.cpython-38.pyc and b/polls/views/__pycache__/user.cpython-38.pyc differ diff --git a/polls/views/user.py b/polls/views/user.py index 1e0a82a..177d1d3 100644 --- a/polls/views/user.py +++ b/polls/views/user.py @@ -37,6 +37,8 @@ def polls_login(request): profile = user.userprofile_set.first() if not profile or profile.status == 0: return JsonResponse({'status': 'error', 'message': '用户尚未激话'}) + if not profile or profile.admin_status == 0: + return JsonResponse({'status': 'error', 'message': '用户已删除,请联系管理员'}) u = authenticate(request, username=phone, password=password) if u is not None: