def purge_db(): wdb.init_db( db_path, drop=True ) return "Done sucessfuly"
return template( 'stats', template_dict ) # static files from bottle import static_file @route('/static/css/<filename>') def server_static(filename): return static_file(filename, root='static/css') @route('/static/img/<filename>') def server_static(filename): return static_file(filename, root='static/img') @route('/static/js/<filename>') def server_static(filename): return static_file(filename, root='static/js') #Remove all data from db #TODO: REMOVE when not needed!!!!! @route('/purge/') def purge_db(): wdb.init_db( db_path, drop=True ) return "Done sucessfuly" # create dbs if not exist wdb.init_db( db_path, drop=False ) run( host='localhost', port=8080 )