flask form default data code example

Example 1: default argument in flask route

@user.route('/<user_id>', defaults={'username': None})
@user.route('/<user_id>/<username>')
def show(user_id, username):
    pass

Example 2: default value for checkbox flask wtf

===================
In Python file
====================  
uart0_en = BooleanField('Enable UART0', validators=[DataRequired(message='Mandatory')], render_kw={'checked': False})

=============
In html file
=============
          <div class="form-group row">
              <div class="col-xs-1">
                    <br>{{ form.uart0_baud.label }}
                    <br>{{ form.uart0_baud }}
              </div>
          </div>