def index(): # return jsonify(session['user']) book_count = Inventory.select().count() borrowed_count = Inventory.select().where( Inventory.status == 'Out').count() user_count = User.select().count() return render_template('nav/index.html', book_count=book_count, borrowed_count=borrowed_count, user_count=user_count)
def get_inventory(): return jsonify([row for row in Inventory.select(Inventory).dicts()])