teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

htmlファイルを載せていなかったので、追記しました。

2021/07/23 16:19

投稿

chario
chario

スコア2

title CHANGED
File without changes
body CHANGED
@@ -99,4 +99,47 @@
99
99
  Python 3.9.4 です。
100
100
  何もかもがゴリゴリの初心者です。
101
101
 
102
+ ###追記(HTMLファイル)
103
+ base.html
104
+ ```html
102
- ここにより詳細な情報を記載してください。
105
+ <!DOCTYPE html>
106
+ <html lang="ja">
107
+ <head>
108
+ <meta charset="UTF-8">
109
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
110
+ <link rel="stylesheet" href="../static/CSS/style.css">
111
+ <title>{{ title }}</title>
112
+ </head>
113
+ <body>
114
+ <h1>ここが変換ベース?</h1>
115
+ <p>{{file_name}}</p>
116
+ {% block content %}
117
+ <!-- ここに変換部分が挿入される?? -->
118
+
119
+ {% endblock %}
120
+ </body>
121
+ </html>
122
+
123
+ ```
124
+ input.html
125
+ ```html
126
+
127
+ {% extends "base.html" %}
128
+ {% block content %}
129
+ <form action="/top" method="GET" enctype="multipart/form-data">
130
+ <input type="url" id="url" name="URL" placeholder="URLを入力">
131
+ <input class="submit-button" value="実行" type="submit">
132
+ </form>
133
+ {% endblock %}
134
+ ```
135
+ output.html
136
+ ```html
137
+ {% extends "base.html" %}
138
+ {% block content %}
139
+ <p>{{ name }}</p>
140
+ <p>{{ URL }}</p>
141
+ <p>{{ html }}</p>
142
+ <h1>あうとぷっとだよ!!</h1>
143
+ <a href="/top">back top</a>
144
+ {% endblock %}
145
+ ```