Jon

Can you post the traceback that you're receiving?

-Jim

On Wednesday, April 22, 2020 at 3:08:14 PM UTC-5, Jon Paris wrote:
>
> In the section on basic Authentication in the documents (
> http://web2py.com/books/default/chapter/29/03/overview#An-image-blog) it 
> says to include in the model the following:
>
> from gluon.tools import Auth
> auth = Auth(db)
> auth.define_tables(username=True)
>
> And to add this to the default controller.
>
> def user():
>     return dict(form=auth())
>
> But _where_?  
>
> The def user(); part was already in the base controller.
>
> So I just added the "from ..." to the start of the file where it already 
> had:
> from gluon.contrib.appconfig import AppConfig
>
> That cause the app to fail with a message that db did not exist.
>
> So I moved the two action lines down to the end following the table 
> definition. No error that way but no authentication occurs either.
>
> So where is the stuff supposed to go so that it is actioned? 
>
>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/55fa045f-ac30-40c9-a9b0-7fb0e82e13bd%40googlegroups.com.

Reply via email to