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
>
> 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
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
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
4 matches
Mail list logo