matching query does not exist Error in Django

后端 未结 6 605
情歌与酒
情歌与酒 2020-11-29 20:35

I have implemented a password recovery functionality in django. With my method, the new password will be sent to the email id entered. It works fine when given the correct e

6条回答
  •  感情败类
    2020-11-29 20:48

    try:
        user = UniversityDetails.objects.get(email=email)
    except UniversityDetails.DoesNotExist:
        user = None
    

    I also see you're storing your passwords in plaintext (a big security no-no!). Consider using the built-in auth system instead.

提交回复
热议问题