add backreference to access weights
some demo code to help me understand flask+wtforms