Added last permission check to edit and delete; Expanded the allowed_templates function to accomdate specific permission type checking (i.e., view, edit, delete); Added a global/catch all error handler so that we never display ugly Python pages;