I try to log in, but I get the error: "'str' object is not callable
". What can happen?
from django.contrib.auth import login, authenticate
login="eeiguomfug"
pas="B6AFQJTK"
user = authenticate(username=login, password=pas)
login(request, user)
I try to log in, but I get the error: "'str' object is not callable
". What can happen?
from django.contrib.auth import login, authenticate
login="eeiguomfug"
pas="B6AFQJTK"
user = authenticate(username=login, password=pas)
login(request, user)
You overrode
login
method with"eeiguomfug"
string. Useusername
variable name instead: