Don't use the post url in a form like "/contact" because you will lose the post data. The correct way is "/contact/".
The reason this doesn't work is that when passed "/contact" you get a redirection to "/contact/", and all the post data is lost. For get, it works though.
Trackback URL for this post:
http://www.voidberg.org/trackback/69



Comments
From Django
---------------
AnJrew May 27, 2006 at 11:55 p.m.
Can anyone explain to me why it is not possible to use a url in the form 'http://example.com/path/ending/in/word' (with no trailing slash), unless that final word contains a period? I can get it to work with 'page.html' and even 'page.' or '.page' but as soon as I remove the dot, the web server sends the browser a redirect appending a slash without giving it to the URL dispatcher.
I don't know whether this is just the behaviour of the built-in development server, or something more generic that all web servers are supposed to do - it might make some sense when serving pages from a filesystem, but doesn't for an application with a URL dispatcher like django. Anybody?
Simon Willison May 28, 2006 at 5:30 a.m.
AnJrew: that's a feature of the common middleware, which is on by default. You can turn it off by setting APPEND_SLASH = False in your settings.py.
Good to know, thanks.
Post new comment