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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/dc897163-2c06-4f34-81bd-4642cfed12fa%40googlegroups.com.

Reply via email to