質問編集履歴
4
alt修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,7 +84,7 @@
|
|
84
84
|
|
85
85
|
```html
|
86
86
|
|
87
|
-
<p><img src="../outputs/image.png" alt="
|
87
|
+
<p><img src="../outputs/image.png" alt="Result"></p>
|
88
88
|
|
89
89
|
```
|
90
90
|
|
3
dir修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,7 +84,7 @@
|
|
84
84
|
|
85
85
|
```html
|
86
86
|
|
87
|
-
<p><img src="/outputs/
|
87
|
+
<p><img src="../outputs/image.png" alt="Simulation Result"></p>
|
88
88
|
|
89
89
|
```
|
90
90
|
|
2
dir修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,7 +84,7 @@
|
|
84
84
|
|
85
85
|
```html
|
86
86
|
|
87
|
-
<p><img src="/outputs/
|
87
|
+
<p><img src="/outputs/test.png" alt="Simulation Result"></p>
|
88
88
|
|
89
89
|
```
|
90
90
|
|
1
app.pyとapp.htmlの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -43,3 +43,49 @@
|
|
43
43
|
|
44
44
|
|
45
45
|
いかがいたせばよろしいでしょうか?
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
app.pyは
|
50
|
+
|
51
|
+
```python
|
52
|
+
|
53
|
+
from flask import Flask, render_template, request
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# appという名前でFlaskのインスタンスを作成
|
58
|
+
|
59
|
+
app = Flask(__name__)
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
@app.route('/', methods=['GET'])
|
64
|
+
|
65
|
+
def index():
|
66
|
+
|
67
|
+
return render_template('app.html',
|
68
|
+
|
69
|
+
)
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
if __name__ == '__main__':
|
74
|
+
|
75
|
+
# 作成したappを起動
|
76
|
+
|
77
|
+
# ここでflaskの起動が始まる
|
78
|
+
|
79
|
+
app.run(debug=True)
|
80
|
+
|
81
|
+
```
|
82
|
+
|
83
|
+
app.htmlは
|
84
|
+
|
85
|
+
```html
|
86
|
+
|
87
|
+
<p><img src="/outputs/{{file_name}}" alt="Simulation Result"></p>
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
としてあります。
|