init
This commit is contained in:
parent
55b93a18f9
commit
52b5c6bd24
4
app.py
4
app.py
|
@ -1,4 +1,4 @@
|
|||
from flask import Flask, render_template, jsonify, redirect
|
||||
from flask import Flask, render_template, jsonify, redirect, url_for
|
||||
from char import get_stats, data
|
||||
|
||||
app = Flask(__name__)
|
||||
|
@ -15,7 +15,7 @@ def _get_stats():
|
|||
def get_data():
|
||||
return jsonify(data)
|
||||
|
||||
@app.route('/submit', methods=["POST"])
|
||||
@app.route('/submit')
|
||||
def submit():
|
||||
return redirect(url_for('index'))
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="grid">
|
||||
<div class="cell -6of12">
|
||||
<div class="cell -3of12">
|
||||
<form class="form" action="/submit" method="POST">
|
||||
<form class="form" action="/submit" method="GET">
|
||||
<fieldset class="form-group">
|
||||
<label for="username">NAME:</label>
|
||||
<input type="text" id="name" class="form-control">
|
||||
|
@ -83,4 +83,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user