Maybe try:

def failed_authentication(url):
    session.flash = "You must be logged in to view this page"
    redirect(url)
auth.settings.on_failed_authentication = failed_authentication

Anthony

On Monday, August 20, 2012 5:48:33 AM UTC-4, Rob Goldsmith wrote:
>
> Is it possible to display a message to the user on the login form when 
> they have been redirected as a result of an auth.requires_login() redirect? 
> (e.g. "You must be logged in to view this page")
>
> I found this discussion of the functionality from 2010
>
> https://groups.google.com/forum/?fromgroups#!topic/web2py/iEHCEFQYXrw%5B1-25%5D
>  
>
> but it doesn't look like it was ever adopted. Is there an alternative way 
> of doing this?
>
> Thanks.
>
>
>

-- 



Reply via email to