Having trouble getting routes to work (not used before) for instance
as a test I did:

in routes.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 <[email protected]> wrote:
> You could use an argument.
>
> www.myapp.com/userprofilecan be mapped 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 <[email protected]> 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 <[email protected]> wrote:
>
> > > Can you explain more?
>
> > > On Jun 2, 8:00 am, ChrisM <[email protected]> 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 -

Reply via email to