Rob, the the 'referrer_actions=None' as a navbar means that the login_next 
is followed. So the 'auth.next=None' is no longer needed.

So the instructions should be

# - - - - - - - - - - - - - - - - - - 
# RAM START - 

# Instructions: Copy all of this into your db.py, and make the one change 
in layout.html

# Solution: how to have a user redirected to a page AFTER login
# in this example, the URL('user/profile') will be used.


# app name: AuthRedirect  <- just a NEW application, with no modication
# web2py Version 2.2.1 (2012-10-21 16:57:04) stable

# - - - - -
# in layout.html view, modify the line:
# <ul id="navbar" class="nav pull-right">{{='auth' in globals() and 
auth.navbar(mode="dropdown") or ''}}</ul>
# to
# <ul id="navbar" class="nav pull-right">{{='auth' in globals() and 
auth.navbar(mode="dropdown",referrer_actions=None) or ''}}</ul>
# this will cause the URL not to display
# 
http://127.0.0.1:8000/AuthRedirect/default/user/login?_next=/AuthRedirect/default/index
 
# but rather
# http://127.0.0.1:8000/AuthRedirect/default/user/


# - - - - -
# one line of CODE BELOW placed in : 
# /models/db.py - located BELOW the  setting under > ## configure auth 
policy lines

auth.settings.login_next = URL('user/profile') 
# uncomment, and change the URL() if you want user to go to a URL after 
saving profile
# auth.settings.profile_next = URL('pageyouwanttogoto') 
# RAM END - - - - - - - - - - - - - - 


Peter

-- 



Reply via email to