Posting form data across urls

0 views
Skip to first unread message

c.po...@bangor.ac.uk

unread,
Jan 20, 2006, 6:01:06 AM1/20/06
to Django users
Hi
I'm probably missing the point here but I'm having a problem with
posting data to other URLs I only seem to be able to access
request.POST (infact reuest.POST is only True ) when I post a form back
to itself using action="."

If I try action="/some/other/url"

where in url.py (r'^some/other/url/$', 'views.dofunction',
info_dict_item),

and
dofunction(request, app_label, mod_name):
if request.POST:
.....

request.POST is not true, is this something to do with the URL
navigation stage, is it by design?

Any ideas for a work around that doesn't involve posting everything to
one single very complex function?

Thanks in advance
Charlie

Andreas Stuhlmüller

unread,
Jan 20, 2006, 6:22:49 AM1/20/06
to django...@googlegroups.com
On 1/20/06, c.po...@bangor.ac.uk <c.po...@bangor.ac.uk> wrote:
> I'm probably missing the point here but I'm having a problem with
> posting data to other URLs I only seem to be able to access
> request.POST (infact reuest.POST is only True ) when I post a form back
> to itself using action="."
>
> If I try action="/some/other/url"

Your POST data is probably getting lost during the redirect to
/some/other/url/. This is a common mistake, see
http://code.djangoproject.com/wiki/NewbieMistakes. Does
action="/some/other/url/" work for you?

Andreas

c.po...@bangor.ac.uk

unread,
Jan 20, 2006, 6:32:05 AM1/20/06
to Django users
Argh!!!! a whole morning lost to an AWOL trailing /

Thank you so much that was really begining to frustrate. Probably
should have read the newbie gaffs wiki before I even started

Reply all
Reply to author
Forward
0 new messages