Your comments

This may be in place for some syntax combinations, but not all. My web2py view (template) files are html with Python code embedded (always between double curly braces {{ }}). The files are initially treated as plain text. When I set them manually to html the Python bits are not recognized (though javascript in the same files is recognized).