Added code skeleton for opening fridge and tools

master
Davide Bongiovanni 8 years ago
parent 7708e18536
commit b170121643

@ -1,6 +1,6 @@
from functools import wraps
from flask import Flask
from flask import render_template, send_from_directory, request, Response
from flask import render_template, send_from_directory, request, Response, redirect, url_for
import json, time
app = Flask(__name__)
@ -25,18 +25,14 @@ def index():
@app.route('/status')
@requires_auth
def somehtml():
def status():
return render_template('status.html')
@app.route('/users')
@app.route('/open/<what>')
@requires_auth
def users():
return 'This button is actually useless.'
@app.route('/history')
@requires_auth
def history():
return render_template('history.html')
def users(what):
print 'opened', what
return redirect(url_for('status'))
@app.route('/gethistory')
@requires_auth

Binary file not shown.

@ -20,9 +20,9 @@
<div class="everything-else">
<h1>Card access manager</h1>
<br>
<a href="/users"><div class="big-button">Open fridge</div></a>
<a href="/open/fridge"><div class="big-button">Open fridge</div></a>
<br>
<a href="/users"><div class="big-button">Open tools</div></a>
<a href="/open/tools"><div class="big-button">Open tools</div></a>
</div>
<div class="shadow" onclick="overlay_out()"></div>
<div class="overlay">

Loading…
Cancel
Save