[google-appengine] if admin to hide code in a template
http://code.google.com/appengine/docs/python/users/adminusers.html user = users.get_current_user() if user: print "Welcome, %s!" % user.nickname() if users.is_current_user_admin(): print "Go to admin area" - - - - - - The above shows how to restrict something unless you are admin can you also do this in a template with python and GAE? Something like this: {% if admin %} ADMIN EYES ONLY {% endif %} Thank you! --~--~-~--~~~---~--~~ 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 group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] newbie question - url routing - using urls to make queries
Are there any tutorials or direct documentation links someone could share that best explain how i could grab from a url and use to make queries? so for example if i make a database to keep track of movies and if i type in myapp.appspot.com/batman it would list all my data for batman from my movies database. I'm a little uncertain from the documentation. Thank you! --~--~-~--~~~---~--~~ 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 group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: newbie question - url routing - using urls to make queries
that's it. i was using python. Thanks Nick! On May 5, 7:47 am, "Nick Johnson (Google)" wrote: > Hi,loopymonkey, > > You don't specify which runtime you're working with, and the best way > to do this is runtime-specific. In Python, however, if you're using > the default webapp framework, you can do this by defining groups in > the handler regular expressions; the contents of these groups will be > passed to the handler. An example can be seen > here:http://code.google.com/appengine/docs/python/tools/webapp/running.html > > -Nick Johnson --~--~-~--~~~---~--~~ 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 group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] help with python url mapping/script handlers to create queries
Any help much appreciated. Looking for any guidance or links to tutorials/examples. If my handler is: handlers: - url: /profile/(.*?)/(.*) script: /employee/\2/\1.py what is needed in my employee.py script to make it so a url that inlcuded /profile/edit/manager would allow me to use edit and manager as variables to make my query and edit that record for manager. I don't see how you can use these two groupings in the urls to make database queries with python GAE. Thanks for any help in advance! --~--~-~--~~~---~--~~ 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 group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---