コード例 #1
0
def custom_validator():
    form = FortyTwoForm()

    if form.validate_on_submit():
        flash('Bingo!')
        return redirect(url_for('index'))
    return render_template('custom_validator.html', form=form)
コード例 #2
0
ファイル: app.py プロジェクト: tygxy/helloflask
def validation():
    form = FortyTwoForm()
    if form.validate_on_submit():
        answer = form.answer.data
        flash('answer is %d' % answer)
        return redirect(url_for('index'))
    return render_template('validation.html', form=form)
コード例 #3
0
def validate_test():
    form = FortyTwoForm()
    if form.validate_on_submit():
        return redirect(url_for('validate_test'))

    return render_template('validate_test.html', form=form)
コード例 #4
0
ファイル: app.py プロジェクト: zx996/helloflask
def custom_validator():
    form = FortyTwoForm()
    if form.validate_on_submit():
        flash('Bingo!')
        return redirect(url_for('index'))
    return render_template('custom_validator.html', form=form)