-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django Defender is not working on my userlogin view #159
Comments
Are you using the built in django LoginView or do you have something custom for handling your logins? |
I had my own login function in my views |
Ok, since you have a custom view you will need to wrap your view with the decorator, or add all the different logic into your login view manually. Did you try that already? |
Sorry, I can't understand |
Is it working now or do you still have an issue? |
I still have if I use Django built-in login system it works correctly but if I use my login function it doesn't work |
any solution? |
@Hamza-Lachi You will need to either add Django defender directly to our custom login function like it shows in the docs here: https://django-defender.readthedocs.io/en/latest/#adapting-to-other-authentication-methods Or you can use the watch_login decorator directly on your login view in the URLs file like you see in the stack overflow answer. https://stackoverflow.com/a/5797020/356788 Hope that helps |
@Hamza-Lachi can we close this issue? |
how Django defender will help in OTP based login app? |
@kencochrane thank you! I ran in the same issue and your comment from May 27, 2020 resolved it for me. Would it make sense to mention this in the docs (unless it is already there and I have not seen it)? |
@TTorture feel free to submit a PR to add it to the docs, it probably isn't there and if a few people are asking about it, there will probably be more in the future. Thank you. |
in my admin it's work correctly
in my user login view it's not working, it didn't show any access attempts and not blocking any IP and username
The text was updated successfully, but these errors were encountered: