42 lines
948 B
Python
42 lines
948 B
Python
from bottle import route, run, template, static_file
|
|
|
|
inventory = [
|
|
('karte', 'E28069950000401171B89CB0', 'huetchen'),
|
|
('tag', 'E280691500004017ABE951FB', 'schild'),
|
|
('stick', 'E280699500004000BD789573', 'besen'),
|
|
]
|
|
|
|
|
|
@route('/pic')
|
|
def serve_pic():
|
|
return static_file('IMG_20250114_220053.jpg', root='/home/dev/projects/RFID/views/')
|
|
|
|
|
|
@route('/ok')
|
|
def serve_ok():
|
|
return static_file('y.png', root='/home/dev/projects/RFID/views/')
|
|
|
|
|
|
@route('/nok')
|
|
def serve_nok():
|
|
return static_file('n.png', root='/home/dev/projects/RFID/views/')
|
|
|
|
|
|
@route('/script')
|
|
def serve_script():
|
|
return static_file('script.js', root='/home/dev/projects/RFID/')
|
|
|
|
|
|
@route('/')
|
|
def hello():
|
|
return template('index')
|
|
|
|
|
|
@route('/fahrzeug-1')
|
|
def f1():
|
|
return {'werkzeug1': True, 'werkzeug2': False}
|
|
|
|
|
|
if __name__ == '__main__':
|
|
run(reloader=True, host='0.0.0.0', port=8080, debug=True)
|