Пример #1
0
class UserEditForm(model_form(User, base_class=Form, field_args=User.get_field_args_create())):
    """
    Class representing the form handling the user editing from the admin area.
    """

    confirm = PasswordField('Repeat Password')

    def get_user(self):
        return User.query.filter_by(username=self.username.data).first()