Hledám jednoduchou možnost ověřeného přístupu na mnou vytvářený web. Přístupů může být současně více. Našel jsem například:
/import userauth from userauth import authorize, UserAuth import cherrypy import os class Root: @cherrypy.expose def index(self): return "This is always accessible by anyone." class Members(UserAuth): """ Unless otherwise stated (secret()), no pages under this module will be viewable by any member outside of the members and admins groups. """ _db = 'sqlite:' + os.path.abspath('filename.db') _authorized = ['members', 'admins'] _unauthorized = '/login' @cherrypy.expose def index(self): return "You're only here if you are a member!" @authorize(['secret'], '/nowhere') @cherrypy.expose def secret(self): # It would work to just make this another section all-together, but # it could be useful... return "Only members of secret can access this..." cherrypy.root = Root() cherrypy.root.members = Members() /Nenašel jsem však modul userauth. Pomůže mi někdo s tímto problémem? Používám Linux s právy root + Appache + mysql Díky _______________________________________________ Python mailing list Python@py.cz http://www.py.cz/mailman/listinfo/python