Flask Megatutorial from http://blog.miguelgrinberg.com/