Thursday 15 July 2010

python - "Can't convert 'bytes' object to str implicitly" in password authentication -



python - "Can't convert 'bytes' object to str implicitly" in password authentication -

when trying authenticate have error.

password = request.post['password'].encode('utf-8') user = auth.authenticate(username = username, password = password)

maybe problem in auth. backend? convert password md5 in auth. backend.

password = hashlib.md5(password).hexdigest()

python django

No comments:

Post a Comment