|Reported by:||rihad||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Chapter 7 of The Django Book says this:
The action="." means “Submit the form to the same URL as the current
I'm not sure this is standard or not, but it doesn't do what's
expected at least on Firefox 3.0.6 (Iceweasel of Debian 5.0 stable):
the form is simply submitted to an emtpy URL "/", which Django's web-
server logs on the console:
i.e. the first line shows me opening the form, and the next one logs
form submission, i.e. no HTTP-level redirects are ever done.
my urlpatterns looks like this:
that is, the trailing slash is optional. Very interestingly, the "."
action submits correctly to itself only if I open the form as "http://
example.com/search/", not as "http://example.com/search" in the first
place, as the Django Book recommends. So it would be more correct to
say that "action="." submits the form to the same URL up to and
including the trailing slash, ignoring everything after it".