migrating views from static files to mako templates