On May 30, 2012, at 9:57 AM, pbreit wrote:
> If you have your routes set up with a default app and default controller, you 
> could do something simple like:
> 
> def u():
>     row = db(db.auth_user.shortname==request.args(0)).select().first()
>     return dict(row=row)
> 
> Which should support URLs like:
> 
> http://www.myserver.com/u/johnsmith
> 

Notice that a URL like this can be implemented in two ways, with 'u' as a 
controller or as a function in the default controller.

If u is a controller, then this URL would invoke its default function (so its 
functions would have to be listed), and the function name should be chosen so 
that it isn't likely to be a user name (that is, don't make the function name 
johnsmith...). Making u a function is the default controller is more 
straightforward, I think.

Reply via email to