Added code skeleton for opening fridge and tools
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user