El 27/03/13 19:16, Brian M escribió:
> I have a page that is using LOAD() to pull in a form that requires the
> user to be logged-in (@auth.requires_login())  In previous versions of
> web2py if the user hadn't yet logged in they'd get the login screen
> within the LOAD()'s DIV and at least could get an idea of what they
> needed to do before proceeding, but now with the current version they
> just see "401 NOT AUTHORIZED" which just completely confuses my users.
>  It appears that this change was made in response to issue 832
> <https://code.google.com/p/web2py/issues/detail?can=1&q=832&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&id=832>
> in this commit
> <https://github.com/web2py/web2py/commit/37acdc0cc66eec4c65fcf59b1136c2e3fda83d4b>.
>  Is there at least some way to specify my own message instead so it says
> something like "Please log-in" rather than "401 NOT AUTHORIZED"?

i prefer (in view):

{{if auth.user:}}
   {{=LOAD('default','whatever.load',args=[a,b,c],ajax=True)}}
{{else:}}
<div class="alert alert-info">
    {{=T("You must login to do ...")}}
</div>
{{pass}}


--
Yoel.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to