Anthony:
Thanks... I appreciate everyone's help on this thread. I did what you
suggested.
and I now have it working (perfectly- I think)
. I added 2 lines to db.py
and inserted into layout.html
referrer_actions=None
as shown in detail below.
I also learned how to redirect a user, after they update their profile
(commented out line below)
I guess it is pretty *simple :)*, just a line here, and a line there (see
yellow highlight below)
... but I never would have figured it out without this thread.
Perhaps my code below, if correct, would be useful to others... I have to
think this is a very common task for web2py apps.
I'm enjoying (slowly) learning web2py, it is a perfect solution for my web
application.
Rob
# - - - - - - - - - - - - - - - - - -
# 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/
# - - - - -
# two lines of CODE BELOW placed in :
# /models/db.py - located BELOW the setting under > ## configure auth
policy lines
auth.next = None
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 - - - - - - - - - - - - - -
--