conversion of some form template to wtforms