Ошибку прочти 😘
Базовый пример: def user_login(request): if request.method == 'POST': user = authenticate(username=request.POST.get('email'), password=request.POST.get('password') ) if user is not None: if user.is_active: login(request, user) return HttpResponse('Authenticated successfully') else: return HttpResponse('Disabled account') else: return HttpResponse('Invalid login') else: print('else') return render(request, 'base.html')
Обсуждают сегодня