django redirect url containing id

Posted by dana on Stack Overflow See other posts from Stack Overflow or by dana
Published on 2010-06-03T11:07:24Z Indexed on 2010/06/03 11:14 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

hello, i want to add in my settings.py a declaration like:

LOGIN_REDIRECT_URL='^private_profile/(?P<id>\d+)/$'
#or 
LOGIN_REDIRECT_URL='/accounts/private_profile/id/'

so that when the user with the id 1, for example,is logging in, he will be redirected to

LOGIN_REDIRECT_URL='/accounts/private_profile/1/'

but both alternatives,

LOGIN_REDIRECT_URL='^private_profile/(?P<id>\d+)/$'
#or 
LOGIN_REDIRECT_URL='/accounts/private_profile/id/'

are wrong, because in my browser i don't see the current user id, where am i wrong? Thanks

© Stack Overflow or respective owner

Related posts about django

Related posts about url