change template system to Jinja2 and add some HTML5 form attributes