Re: How do I get POST variables in my template

2006-01-27 Thread tonemcd
Thanks for the pointer Jeremy, but that was one of the first places I looked ;) - I made *real* sure that my action had a '/' at the end of it... Cheers, Tone

Re: How do I get POST variables in my template

2006-01-26 Thread Jeremy Dunck
On 1/26/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > If your request.POST is displayed as , that means > request.POST is empty. If request.POST had something in it, it'd look > like this: > > And it might me you've run into a newbie hole http://code.djangoproject.com/wiki/NewbieMistake

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
* thud! * - the sound of a rather large penny dropping. Many many thanks Adrian, it's making a *lot* more sense now (how on earth did I miss that page in the docs!) I *think* that the reason why my request.POST was coming though as empty (even when I clicked submit) is that I had no name for my

Re: How do I get POST variables in my template

2006-01-26 Thread Adrian Holovaty
On 1/26/06, tonemcd <[EMAIL PROTECTED]> wrote: > Essentially, I used to have statements like this some_variable_from_my_form> sprinkled around my pages to check that > form-based variables where being passed through correctly. Zope put > into a namespace called 'form', but also made them availabl

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
Hello again Amit, I'm trying to get the Zen of Django, by using methods I used to use in Zope ;) Essentially, I used to have statements like this sprinkled around my pages to check that form-based variables where being passed through correctly. Zope put into a namespace called 'form', but also

Re: How do I get POST variables in my template

2006-01-26 Thread Amit Upadhyay
On 1/27/06, tonemcd <[EMAIL PROTECTED]> wrote: Cheers Eric, but 'debug' doesn't seem to work in an intuitive way - atleast to me ;)e.g.{% debug %}Hi tonemcd, What exactly are you trying to do? If you just want to inspect the variables passed to view code, why dont you use a  "assert False" somewher

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
Cheers Eric, but 'debug' doesn't seem to work in an intuitive way - at least to me ;) e.g. {% debug %} dumps this into the page {'block': It is '>, ,

Re: How do I get POST variables in my template

2006-01-26 Thread Eric Walstad
On Thursday 26 January 2006 09:43, tonemcd wrote: > I guess what I was after was functionality like in > Zope, where the entire HTTP Request object is dumped, along with > environment and other variables. GET and POST are all expanded out too. > With the Zope PageTemplate code that Stefan contrib

Re: How do I get POST variables in my template

2006-01-26 Thread tonemcd
Thanks for the info 'the.ech0' - it seems that's what I have to do. I guess what I was after was functionality like in Zope, where the entire HTTP Request object is dumped, along with environment and other variables. GET and POST are all expanded out too. With the Zope PageTemplate code that Ste

Re: How do I get POST variables in my template

2006-01-26 Thread [EMAIL PROTECTED]
you have to loop over the variable to display elements from the dict or just pass in the value you want to from the post. return render_to_response('resources/index', { 'request': request, 'foo': request.POST["foo"], 'mes

Re: How do I get POST variables in my template

2006-01-26 Thread [EMAIL PROTECTED]
you have to loop over the variable to display elements from the dict or just pass in the value you want to from the post. return render_to_response('resources/index', { 'request': request, 'foo': request.POST["foo"], 'mes

How do I get POST variables in my template

2006-01-26 Thread tonemcd
Hi all, This is probably going to sound really silly, but when I'm debugging, I just can't easily output the contents of request.POST and request.GET into my templates. I have tried this; return render_to_response('resources/index', { 'request': request,