Problems with authenticate in Django 1.10

14 views
Skip to first unread message

Marcos Fraga

unread,
Aug 23, 2019, 5:28:39 PM8/23/19
to Django users
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?
Reply all
Reply to author
Forward
0 new messages