How to clear password field after failed login?
I'm using django.contrib.auth.views.login to log in users. When login is failed, the user and password fields get posted back to the form. What's the proper way to clean those? ...
I'm using django.contrib.auth.views.login to log in users. When login is failed, the user and password fields get posted back to the form. What's the proper way to clean those? ...
This is my login views: def login(request): redirect_to = request.REQUEST.get("next") if request.method == 'POST': formL = LoginForm(data=request.POST) if formL.is_valid(): if not redirect_to or '//' in redirect_to or ' ' in redirect_to: redirect_to = "/blogs/" ...
Hi, I need to know how to start a session by Ajax in Django. I'm doing exactly as described bellow, but it is not working! The request is sent correctly, but don't start any session. If a request directly without ajax it works! What is going on? '# urls r'^logout/$', 'autenticacao.views.logout_view' '# view of login def login_view...