In Django / Pinax, I’ve come across the login form which starts like this :
<form class='login' method='POST' action=''>
It works perfectly well. So I assume that either some java-script or something in the Django framework is putting the value into the action attribute.
So, my questions:
- How does Django insert the action?
- Why do they do it like this?
- How can I find out what the action of this form is?
Update : I see this is not a Django thing at all, but what most browsers do.
Having an action of an empty string in most browsers points the form at the URL the browser currently has loaded, which is the script that served the form in the first place.