[web2py] Re: I need a bit of Help with a function ! .. please ...

2012-11-22 Thread Paolo Caruccio
Please follow lyn2py's answer and you will be on the right track. def index(): if auth.is_logged_in(): redirect(URL('profile', 'member', args=auth.user_id)) @auth.requires_login() def member(): if int(request.args(0)) == auth.user_id: print 'profile of connected membe

[web2py] Re: I need a bit of Help with a function ! .. please ...

2012-11-21 Thread Don_X
> > Thank you lyn2py ... > Unfortunately, your proposition does not work ! In this situation, I wanted to practice the DRY principal ( DONT REAPEAT YOURSELF ) ... but it seems ( based on my limited knowledge ) the only way that I succeeded was in duplicating the exact same view page of ind

[web2py] Re: I need a bit of Help with a function ! .. please ...

2012-11-21 Thread lyn2py
Use auth.user_id instead. def index(): if auth.is_logged_in(): redirect(URL('profile', 'member',args=auth.user_id)) On Wednesday, November 21, 2012 12:24:17 PM UTC+8, Don_X wrote: > > In an app where users have their own profile page ! > Once a user gets logged in with their credenti

[web2py] Re: I need a bit of Help with a function ! .. please ...

2012-11-20 Thread Don_X
when I tested it .. i get an error : I tried to change the line " if member.id == auth_user[args]" to "if member.id == auth_user.args " ... I get basically the same kind of error I am running out of ideas ... please help File "/home/www-data/web2py/applications/adminsoccer/controllers/pr