Friday, August 23, 2019

Problems with authenticate in Django 1.10

HI,

I'm trying to migrate an application from Django1.8.5/Python2.7 to Django 1.10/Python3.6 and having problems with code below:

def clean_password(self):
        username
= self.cleaned_data.get('username')
        password
= self.cleaned_data.get('password')
        user
= authenticate(username=username, password=password)
       
if user is None:
           
raise forms.ValidationError(u'Senha incorreta.')


When I run in Django 1.8.5 it works fine, but when I run in Django 1.8.5 the authenticate command returns invalid password.

Can anybody help me?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/77737791-ac4a-4639-bea6-32f0a4beb72f%40googlegroups.com.

No comments:

Post a Comment