質問編集履歴
1
htmlファイルを載せていなかったので、追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -200,4 +200,90 @@
|
|
200
200
|
|
201
201
|
|
202
202
|
|
203
|
+
###追記(HTMLファイル)
|
204
|
+
|
205
|
+
base.html
|
206
|
+
|
207
|
+
```html
|
208
|
+
|
203
|
-
|
209
|
+
<!DOCTYPE html>
|
210
|
+
|
211
|
+
<html lang="ja">
|
212
|
+
|
213
|
+
<head>
|
214
|
+
|
215
|
+
<meta charset="UTF-8">
|
216
|
+
|
217
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
218
|
+
|
219
|
+
<link rel="stylesheet" href="../static/CSS/style.css">
|
220
|
+
|
221
|
+
<title>{{ title }}</title>
|
222
|
+
|
223
|
+
</head>
|
224
|
+
|
225
|
+
<body>
|
226
|
+
|
227
|
+
<h1>ここが変換ベース?</h1>
|
228
|
+
|
229
|
+
<p>{{file_name}}</p>
|
230
|
+
|
231
|
+
{% block content %}
|
232
|
+
|
233
|
+
<!-- ここに変換部分が挿入される?? -->
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
{% endblock %}
|
238
|
+
|
239
|
+
</body>
|
240
|
+
|
241
|
+
</html>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
```
|
246
|
+
|
247
|
+
input.html
|
248
|
+
|
249
|
+
```html
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
{% extends "base.html" %}
|
254
|
+
|
255
|
+
{% block content %}
|
256
|
+
|
257
|
+
<form action="/top" method="GET" enctype="multipart/form-data">
|
258
|
+
|
259
|
+
<input type="url" id="url" name="URL" placeholder="URLを入力">
|
260
|
+
|
261
|
+
<input class="submit-button" value="実行" type="submit">
|
262
|
+
|
263
|
+
</form>
|
264
|
+
|
265
|
+
{% endblock %}
|
266
|
+
|
267
|
+
```
|
268
|
+
|
269
|
+
output.html
|
270
|
+
|
271
|
+
```html
|
272
|
+
|
273
|
+
{% extends "base.html" %}
|
274
|
+
|
275
|
+
{% block content %}
|
276
|
+
|
277
|
+
<p>{{ name }}</p>
|
278
|
+
|
279
|
+
<p>{{ URL }}</p>
|
280
|
+
|
281
|
+
<p>{{ html }}</p>
|
282
|
+
|
283
|
+
<h1>あうとぷっとだよ!!</h1>
|
284
|
+
|
285
|
+
<a href="/top">back top</a>
|
286
|
+
|
287
|
+
{% endblock %}
|
288
|
+
|
289
|
+
```
|