diff --git a/server.py b/server.py index 9106408..31661a6 100644 --- a/server.py +++ b/server.py @@ -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/') @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 diff --git a/server.pyc b/server.pyc index 0cfba35..7752a69 100644 Binary files a/server.pyc and b/server.pyc differ diff --git a/templates/status.html b/templates/status.html index 0959042..54ac81d 100644 --- a/templates/status.html +++ b/templates/status.html @@ -20,9 +20,9 @@

Card access manager


-
Open fridge
+
Open fridge

-
Open tools
+
Open tools