Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-22 Thread djidjadji
instead of ### print the value of the variable merchandise_type 2011/1/22 Zeynel : > On Jan 22, 12:07 pm, djidjadji wrote: > >> Make merchandise_type a hidden field of the form generated by >> Directory() and get the value in the DirectorySubmitHandler(). > > > Ok. I have the hidden field in t

Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-22 Thread Robert Kluin
Hi Zeynel, You'll have to show us how you are rendering the form. If you're using template, just pass the value you get for type to your template and print the value, like djidjadji said. Robert On Sat, Jan 22, 2011 at 10:01, Zeynel wrote: > On Jan 22, 12:53 pm, djidjadji wrote: >>

Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-22 Thread djidjadji
urllib.urlencode() should be used to quote the parameter If Directory() is processed after DirectorySubmitHandler() you can NEVER get the merchandise_type variable. And it is possibly handled in another app instance. dir_type = merchandise_type # remove this line dir_type is never used in Direct

Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-22 Thread djidjadji
'type' is between quotes ==> a string. Has nothing to do with a variable or a function object. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this

Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-22 Thread Robert Kluin
So, if you are getting 'type=' twice, did you think about trying: self.redirect("/dir?%s" % urllib.urlencode({ "type" : self.request.get("dir_type") } )) On Sat, Jan 22, 2011 at 20:33, Zeynel wrote: > On Jan 22, 8:02 pm, djidjadji wrote: > >> 'type' is between quotes ==> a string. >> Has

Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-22 Thread Robert Kluin
If you're trying to do this using Mako templates, here is a fully functional 'demo' that you should be able to easily adapt to do exactly what you're asking about. app.yaml handlers: - url: /makodemo.* script: makodemo.py login: admin makodemo.py --- #!/usr/bin/env python f

Re: [google-appengine] Re: How to use the same variable in two handlers?

2011-01-23 Thread djidjadji
With what you want to do there IS NO difference in doing it in Django templates then in Mako templates. That will result in a hatred awards Mako too. 2011/1/23 Zeynel : > Unfortunately, I have an irrational hatred for Django templates so I > am trying to do this with Mako templates. -- You recei