[Answer]-Custom Django Login returning 'OK'

1šŸ‘

I am not sure why you are getting the OK page. However, I used your code with ā€œrenderā€ replacing ā€œrender_to_responseā€:

render(request, ā€˜poster_login.htmlā€™,{ā€˜stateā€™:state, ā€˜usernameā€™: username})

And with ā€œcsrf_tokenā€ in your template:

{% csrf_token %}
ā€¦

Doing this gives the expected result on my setup.

Leave a comment