Пример #1
0
def home():
    if request.method == 'POST':
        form = PostForm(request.form)
        user_input = PostModel(form.data)
        if form.validate_on_submit():
            user_input.save_text()
            user_input.get_qr()
            if form.data['download_file']:
                return redirect('/get_file')
            else:
                return redirect('/qr')

    else:
        form = PostForm()

    return render_template('index.html', form=form)