Django 'AnonymousUser' object has no attribute '_meta'

前端 未结 6 1588
花落未央
花落未央 2020-12-11 14:48

I am using social login in my Django app. So, I have added additional backends in my settings.py file.

AUTHENTICATION_BACKENDS = [
    \'django.         


        
6条回答
  •  攒了一身酷
    2020-12-11 15:27

    i believe its because you havnt hashed the password. this worked for me. try:

            user = userform.save()
            user.set_password(user.password)
            user.save()
    

提交回复
热议问题