On Apr 4, 2011, at 12:50 PM, Shark wrote: > > can you help me by writing an example ?
Sure. Just copy router.example.py to routes.py, and change the default_application (in the BASE router) from "welcome" to "init". > > Thanks > > On Apr 4, 4:25 pm, Jonathan Lundell <[email protected]> wrote: >> On Apr 4, 2011, at 5:02 AM, Ahmed Sharkawy wrote: >> >>> I use GAE and I use the app.yaml to solve this >>> but there is anther problem >>> I have more than one function in the file so I want to point to the >>> specific function >> >>> the code in app.yaml is >>> - url: /login >>> script: applications\init\controllers\login.py >> >> I don't think this can work. The stock web2py app.yaml routes all web2py >> requests like this: >> >> - url: .* >> script: gaehandler.py >> secure: optional >> >> ...where gaehandler.py is the gateway script, as it were, to web2py in a GAE >> environment. >> >> >> >>> but if I have a script contain 2 functions how to point to one of them ? >> >> web2py will pick out the right function from the URL, but you have to go >> through the handler. Use routes.py to shorten the URLs if you need to. >> >>> Thanks for your patience and your ideas >> >>> On 3 April 2011 23:38, Jonathan Lundell <[email protected]> wrote: >>> On Apr 3, 2011, at 2:22 PM, pbreit wrote: >> >>>> Oh right, cuz login is going to be /user/login ? >> >>> Well, that too, but simply setting default_application (without any >>> routing) will never suppress the application unless it's also suppressing >>> the controller and function.

