Form.html gebaut, Blöcke ausgelagert
This commit is contained in:
4
app.py
4
app.py
@@ -6,6 +6,10 @@ app = Flask(__name__)
|
||||
def home():
|
||||
return render_template('index.html')
|
||||
|
||||
@app.route ('/form', methods=['GET','POST'])
|
||||
def form():
|
||||
return render_template('form.html')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
@@ -4,18 +4,6 @@
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Homepage</h1>
|
||||
<input type="radio" class="btn-check" name="options-base" id="option5" autocomplete="off" checked>
|
||||
<label class="btn" for="option5">Fuck yes!</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="options-base" id="option6" autocomplete="off">
|
||||
<label class="btn" for="option6">Fuck no!</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="options-base" id="option7" autocomplete="off">
|
||||
<label class="btn" for="option7">Fuck you!</label>
|
||||
|
||||
<button type="button" class="btn btn-primary">Submit</button>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
18
templates/form.html
Normal file
18
templates/form.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Title: Form
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<input type="radio" class="btn-check" name="options-base" id="option5" autocomplete="off" checked>
|
||||
<label class="btn" for="option5">Fuck yes!</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="options-base" id="option6" autocomplete="off">
|
||||
<label class="btn" for="option6">Fuck no!</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="options-base" id="option7" autocomplete="off">
|
||||
<label class="btn" for="option7">Fuck you!</label>
|
||||
|
||||
<button type="button" class="btn btn-primary">Submit</button>
|
||||
{% endblock %}
|
||||
@@ -1,3 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Homepage{% endblock %}
|
||||
{% block content %}<h1>Test</h1>{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
Title: Index
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Content: Index
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user