I don't know that it can be done in the app.yaml definition, but you
can define your handler as is and have the handler map the variables.

If your app.yaml is:

handlers:
- url: /profile/*
 script: /employee.py

and your main function in employee.py is:

def main():
    application = webapp.WSGIApplication(
        [('/profile/(.*?)/(.*)', EmployeeHandler)
         ],debug=True)
    wsgiref.handlers.CGIHandler().run(application)

and your handler function is:

class EmployeeHandler(webapp.RequestHandler):
    def get(self, *args):
        # do your processing here

Then the two regexp groups will be passed to the get method in the
args parameter.

On May 14, 2:48 pm, loopymonkey <[email protected]> wrote:
> 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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to