Re: I think I'm doing something wrong...
Darn, well, that fixed it :P And to think I had the same problem with TurboGears a while bak. Sheesh. Thanks, everyone! :) Elver On 6/7/06, Max Battcher <[EMAIL PROTECTED]> wrote: > > Elver Loho wrote: > > > > Sadly it seems you, along with so many, many others, have fallen into > the easiest problem in the book. Your action address should have a > following /. > > http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata > > -- > --Max Battcher-- > http://www.worldmaker.net/ > "I'm gonna win, trust in me / I have come to save this world / and in > the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track) > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: I think I'm doing something wrong...
Elver Loho wrote: > Sadly it seems you, along with so many, many others, have fallen into the easiest problem in the book. Your action address should have a following /. http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: I think I'm doing something wrong...
Haha, three replies within two minutes. Sorry for the spam. David Adam [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: I think I'm doing something wrong...
Elver, I haven't had much of a play with it, but I get much better results from your little test program if I add a trailing slash to the action field of your form. i.e. - + This avoids the redirect that Django sends when it receives a URL without a trailing slash, trashing your form information. David Adam [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: I think I'm doing something wrong...
On Wed, 2006-06-07 at 05:00 +0300, Elver Loho wrote: [...] > URL: > (r'^make/$', 'latestbooks.latest.views.make_sidebar'), > > HTML: > > > Ainult samal > paeval ilmunud raamatud > Täna ja eile ilmunud > raamatud > > Täna, eile ja üleeile ilmunud > raamatud > > > > > > VIEW: > def make_sidebar(request): > > print "POST.keys()", request.POST.keys() > print "GET.keys()", request.GET.keys() > > RESULT: > [07/Jun/2006 04:50:23] "POST /make HTTP/1.1" 301 0 > POST.keys() [] > GET.keys() [] > [07/Jun/2006 04:50:23] "GET /make/ HTTP/1.1" 200 1063 > [07/Jun/2006 04:50:23] "GET /media/latestbooks.css HTTP/1.1" 304 0 One thing I would suggest is to change your form action to submit to "/make/". The trailing slash will avoid the redirect you are seeing (the 301 response code). Note the warning in the HTTP/1.1 spec about redirects from POSTs here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2 It looks like your POST is being resubmitted as a GET and the form values may well be being dropped in the process (unless the redirected URL shows them as converted to GET params). Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---