Hi,

I am trying to get Authentication module for web.py 0.3 from
http://jpscaletti.com/webpy_auth/ to work.

I places the download files on my machine into /usr/local/lib/
python2.7/dist-packages/web.py-0.36-py2.7.egg/web/contrib



Below is my code and the error message when I browse to http://0.0.0.0:8080/.
But it redirects to http://0.0.0.0:8080/login where I get the error.
So...just wondering is there is a know issues or if I did something
wrong.

Thanks

#!/usr/bin/python
import web
from web.contrib.auth import DBAuth

render = web.template.render('templates/')
web.config.debug = False
web.internalerror = web.debugerror
urls=('/','index')
db = web.database(dbn='mysql', db='rtb', user='root', pw='test')
app = web.application(urls, globals())
settings = {}
auth = DBAuth(app, db, **settings)

def notfound():
    return 'not found'
class index:
    @auth.protected()
    def GET(self):
        web.header("Content-Type","text/html; charset=utf-8")
        return "test"

if __name__ == "__main__":
    web.webapi.internalerror = web.debugerror
    app.notfound = notfound
    app.run()


 raise AttributeError, "No template named " + name
AttributeError: No template named login

127.0.0.1:43433 - - [09/Feb/2012 09:26:37] "HTTP/1.1 GET /login" - 500
Internal Server Error

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to