質問編集履歴
1
誤植を直しました。
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
理解不能のunexpected
|
1
|
+
理解不能のunexpected indent
|
body
CHANGED
@@ -22,8 +22,9 @@
|
|
22
22
|
def log_request(req: 'flask_request', res: str) -> None:
|
23
23
|
with open('vsearch.log', 'a')as log:
|
24
24
|
print(req.form, req.remote_addr, req.user_agent, res, file=log, sep='|')
|
25
|
+
|
25
26
|
@app.route('/search4', methods=['POST'])
|
26
|
-
def do_search() ->
|
27
|
+
def do_search() -> 'html':
|
27
28
|
phrase = request.form['phrase']
|
28
29
|
letters = request.form['letters']
|
29
30
|
title = 'Results'
|
@@ -36,12 +37,12 @@
|
|
36
37
|
the_results=results,)
|
37
38
|
@app.route('/')
|
38
39
|
@app.route('/entry')
|
39
|
-
def entry_page() ->
|
40
|
+
def entry_page() -> 'html':
|
40
41
|
return render_template('entry.html',
|
41
42
|
the_title='Welcome to search4letters of the website version!')
|
42
43
|
|
43
44
|
@app.route('/viewlog')
|
44
|
-
def view_the_log() ->
|
45
|
+
def view_the_log() -> 'html':
|
45
46
|
contents = []
|
46
47
|
with open('vsearch.log') as log:
|
47
48
|
for line in log:
|
@@ -56,13 +57,14 @@
|
|
56
57
|
if __name__ == '__main__':
|
57
58
|
app.run(debug=True)
|
58
59
|
|
60
|
+
|
59
61
|
```
|
60
62
|
|
61
63
|
### 試したこと
|
62
64
|
|
63
|
-
インデ
|
65
|
+
インデントが原因だと思い、
|
64
66
|
当該部分を書き直し、
|
65
|
-
不要な
|
67
|
+
不要な改行がないように
|
66
68
|
気を付けましたが、
|
67
69
|
直りません。
|
68
70
|
|