Just put some conditional logic in the controller and/or view. For example:
{{if auth.user_id:}}
The application
{{else:}}
Sign up / login
{{pass}}
Perhaps a better option is the standard approach of decorating actions that
require login, which will automatically redirect to the login page for
anyone who is not logged in.
Anthony
On Saturday, September 24, 2016 at 12:37:37 PM UTC-4, David Ripplinger
wrote:
>
> Does anyone know how I can have the same url return a totally different
> page depending on whether the user is logged in or not? I'd like the home
> page to display a simple "Sign up / log in" page when the user is logged
> out and display the actual app when logged out. I'd rather not have a
> separate url for when they are logged into the app.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.