Assuming your application is in init folder - the following might work routes_in=( ('/profile/$args', '/init/default/profile/$args'), ('/profile/$args/(?P<any>.*$)', '/init/default/profile/$args/ \g<any>'), )
routes_out=( ('/init/default/profile/$args', '/profile/$args'), ('/init/default/profile/$args/\g<any>', '/profile/$args/(?P<any>.* $)'), ) On Jun 4, 6:23 pm, ChrisM <cjjmur...@gmail.com> wrote: > anyone? > > On Jun 3, 2:29 pm, ChrisM <cjjmur...@gmail.com> wrote: > > > > > Having trouble gettingroutesto work (not used before) for instance > > as a test I did: > > > inroutes.py: > > routes_in = ( ('/profile/*', '/init/default/userprofilepage/*'),) > > routes_out = ( ('/init/default/userprofilepage/*', '/profile'),) > > > in default controller: > > def userprofilepage(): > > userprofile request.args(0) > > return dict(userprofile=userprofile) > > > in userprofilepage.html: > > > {{extend 'layout.html'}} > > <h1>{{=userprofile}}</h1> > > > get invalid request? > > > any help appreciated. > > chrism > > > On Jun 3, 6:08 am, Adi <aditya.sa...@gmail.com> wrote: > > > > You could use an argument. > > > >www.myapp.com/userprofilecanbemapped to a controller/method > > >likewww.myapp.com/app/profiles/show/userprofile > > > > where app = application, profiles = controller, show = function, > > > userprofile is an argument accessed by request.args(0) inside "show". > > > You can use it to query database according to that user. > > > > In order to hide "app/profiles/show" from url follow the usualroutes.py > > > mapping (its given on some other post here) assuming you > > > have only one app on the server. > > > > On Jun 2, 9:31 pm, ChrisM <cjjmur...@gmail.com> wrote: > > > > > For isntance I have RPX login which creates user profile for each > > > > logged in user. > > > > I would like to give each one of these users there own homepage (i.e. > > > > like twitter) which could be > > > > dynamically created. > > > > So I thought the first task was to see how thiscould be mapped, > > > > perhaps by querying db.profile and then mapping throughroutes.py. > > > > > chrism > > > > > On Jun 2, 3:46 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > > Can you explain more? > > > > > > On Jun 2, 8:00 am, ChrisM <cjjmur...@gmail.com> wrote: > > > > > > > I searched through the list but couldn't find any discussion on this > > > > > > topic. > > > > > > > Any ideas how the following can be achieved withroutes.py > > > > > > >www.appname.com\userprofilename > > > > > > > I am guessing that there would need to be a db.auth lookup to match > > > > > > the userprofilename > > > > > > and then pass that to a generic controller, but how? > > > > > > > Help Aprreciated > > > > > > > ChrisM- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text -