diff --git a/brmbar3/README.md b/brmbar3/README.md index 0bf93ca..b113083 100644 --- a/brmbar3/README.md +++ b/brmbar3/README.md @@ -53,6 +53,7 @@ These UIs are provided: advanced functionality like inventory revision that is too tedious to implement in the Qt4 GUI and only the brmbar admins are expected to do these tasks. +* **brmbar-web**: A simple read-only web interface to the stock list. TODO ---- diff --git a/brmbar3/brmbar-web.py b/brmbar3/brmbar-web.py new file mode 100755 index 0000000..dd54a5e --- /dev/null +++ b/brmbar3/brmbar-web.py @@ -0,0 +1,29 @@ +#!/usr/bin/python3 + +import sys + +from brmbar import Database + +import brmbar + +from flask import * +app = Flask(__name__) +#app.debug = True + +@app.route('/stock') +def stock(): + # TODO: Use a fancy template. + # FIXME: XSS protection. + response = '
Id | Item Name | Bal. |
---|---|---|
%d | %s | %d |