Commit 23ab6233 authored by Kristian Tan's avatar Kristian Tan

Rerouting

parent ba0ba6f2
...@@ -136,7 +136,7 @@ def create_entry(change_pin): ...@@ -136,7 +136,7 @@ def create_entry(change_pin):
pins[change_pin]['on_date'] = None pins[change_pin]['on_date'] = None
@app.route('/handle_data/update_kWh', methods=['POST']) @app.route('/handle_data', methods=['POST'])
def handle_data(): def handle_data():
new_price = request.form['kWhprice'] new_price = request.form['kWhprice']
os.environ['cost_per_kWh'] = str(new_price) os.environ['cost_per_kWh'] = str(new_price)
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<div class="inputs"> <div class="inputs">
<form action="{{ url_for('handle_data/update_kWh') }}" method="post"> <form action="{{ url_for('handle_data') }}" method="post">
Change cost per kWh: <input type="text" name="kWhprice"> Change cost per kWh: <input type="text" name="kWhprice">
<input type="submit"> <input type="submit">
</form> </form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment