前提・実現したいこと
pythonとhtml & cssのテンプレートを使用し、
簡単なweb applicationを作りたいです。
発生している問題・エラーメッセージ
それまでは正常に動作していたのですが、
完成形にしていくと以下のエラーが起きました。
IndentationError: expected an indented block
該当のソースコード
Python
1from flask import Flask, render_template, request, 2from vsearch import search4letters 3 4app = Flask(__name__) 5 6 7@app.route('/search4', methods=['POST']) 8def do_search() -> str: 9 phrase = request.form['phrase'] 10 letters = request.form['letters'] 11 title = 'Results' 12 results = str(search4letters(phrase, letters)) 13 return render_template('results.html', 14 the_phrase=phrase, 15 the_letters=letters, 16 the_title=title, 17 the_results=results,) 18@app.route('/') 19@app.route('/entry') 20def entry_page() -> str: 21 return render_template('entry.html', 22 the_title='Welcome to search4letters of the website version!') 23 24if __name__=='__main__': 25app.run(debug=True) 26 27
何卒宜しくお願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/14 05:19