All the code can be found in the lecture7 branch of the start app repository.
You can find the details of what we are doing in class in the web2py book. In particular:
Please at least look at these chapters. Not all you need to know for the homework is covered in class during lecture.