1đź‘Ť
Thanks to some feedback here and on Pythonanywhere, I’ve been able to solve this issue.
I had narrowed it down to a problem passing the HTML since the login works correctly on the /accounts/login/ page. I found out that the logging in from the header worked only on the /accounts/login/, but the other pages it did not, so that meant there definitely was a problem passing to the page.
The problem ended up being that I had the input property named “action”, when it should have been “formaction”. I knew it was really close and it would be something dumb like that 🙂
0đź‘Ť
There’s absolutely nothing wrong with setting your form’s action
property to a URL that is different than the current view being viewed in order to perform your login.
You can always bring the user directly back to the page they were viewing by setting the next
hidden field in your form to the value of the current URL, then passing that to the built-in login view, or redirect them somewhere else…it’s entirely up to you.
- [Answer]-Migrate error with Django 1.7 while adding new model
- [Answer]-Folderlike group-structure with django-mptt
- [Answer]-Django form posting does nothing
- [Answer]-Why internet explorer sends Button in form POST?
- [Answer]-Populating a database in django and retrieving the values in the view gives error becaue of ForeignKey?