Our first task is to create a small application that does little more than present the user with a logon screen. It will be the starting point of our tasklist application and many others as well.
The code for this example as well as most other examples in this book is available from the Packt website. If you have not downloaded it yet, this might be a good time to do so.
Enter the following pieces of code and save it in a file called logonapp.py
in the same directory as the other files distributed with this chapter (Chapter 3 in the sample code):
Chapter3/logonapp.py
import cherrypy import logon class Root(object): logon = logon.Logon(path="/logon", authenticated="/", not_authenticated="/goaway") @cherrypy.expose def index(self): username=logon.checkauth('/logon') return ''' <html><body> <p>Hello user <b>%s</b></p> </body><...