Sunday, February 22, 2015

Re: confirm_login_allowed in subclassed authentication returns wrong error message

Apologies, my mistake after all (as it is usually:)). I've just finally found out that the login function from django.contrib.auth uses my own template where this message is displayed whenever there is error in the form.


Dne úterý 17. února 2015 21:00:15 UTC+1 Tomáš Sekanina napsal(a):
Hello, 

I have a custom user model and I need to extend the user authentication during login and found this solution: http://bit.ly/1u705o9  It would work great for me and I ended up implementing this . It works in a manner that it does not let such user log in, but raises a different error message which is: 'Sorry, that's not a valid username or password.'.  I tried posting this question on different forums but got no answer :(. It seems really simple so I do not see there a place for an error unless there is some problem with the custom user model. I will be glad for your opinion at least :).

Thank you in advance for any effort to solve this. 

--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6e0ae819-b9c8-44e9-b8bf-6b0632c44b33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment