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 azeyn...@gmail.com:
Unfortunately, I have an irrational hatred for Django templates so I
am trying to do this with Mako
On Jan 23, 1:12 am, Robert Kluin robert.kl...@gmail.com wrote:
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.
Thanks! But I decided in principle not to use templates at this
On Jan 22, 12:07 pm, djidjadji djidja...@gmail.com wrote:
Make merchandise_type a hidden input field of the form generated by
Directory() and get the value in the DirectorySubmitHandler().
Ok. I have the hidden field in the form in Directory like this:
input type=hidden name=dir_type
input type=hidden name=dir_type value=###
instead of ### print the value of the variable merchandise_type
2011/1/22 Zeynel azeyn...@gmail.com:
On Jan 22, 12:07 pm, djidjadji djidja...@gmail.com wrote:
Make merchandise_type a hidden input field of the form generated by
Directory() and get the
On Jan 22, 12:53 pm, djidjadji djidja...@gmail.com wrote:
input type=hidden name=dir_type value=###
instead of ### print the value of the variable merchandise_type
Thanks, but I don't understand. The value of the url parameter is
given by
self.request.get(type, )
I cannot put this value in
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 azeyn...@gmail.com wrote:
On Jan 22, 12:53 pm,
Hi,
render is a common word meaning build the form. You are sending the
user a page, with the form. How do you build that page or how do you
print the HTML you've written?
PD: Have you seen the Python tutorial?
http://code.google.com/intl/en/appengine/docs/python/gettingstarted/
On 22 ene,
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
On Jan 22, 4:53 pm, djidjadji djidja...@gmail.com wrote:
urllib.urlencode() should be used to quote the parameter
import urllib
self.redirect(/dir?%s % urllib.urlencode({ 'type' :
self.request.get(dir_type) } )
Thanks. But obviously I am missing something here. The value of type
in
'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
On Jan 22, 8:02 pm, djidjadji djidja...@gmail.com wrote:
'type' is between quotes == a string.
Has nothing to do with a variable or a function object.
I understand this. If I use this solution the url is always
/dir?type=type=
type is not replaced with the merchandise_type. Maybe I am not
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 azeyn...@gmail.com wrote:
On Jan 22, 8:02 pm, djidjadji djidja...@gmail.com wrote:
'type' is between
On Jan 22, 10:35 pm, Robert Kluin robert.kl...@gmail.com wrote:
So, if you are getting 'type=' twice, did you think about trying:
self.redirect(/dir?%s % urllib.urlencode({ type :
self.request.get(dir_type) } ))
Yes, actually I thought about that but I did not try it because I did
not get
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
14 matches
Mail list logo