def stocks(): global reverse sortby = request.args.get('sortby') if request.args.get('sortby') else "_id" prices = Log.prices() prices.sort(key=operator.attrgetter(sortby), reverse=reverse) reverse = not reverse return render_template('update.html', prices=prices)
def delete(stock): Log.delete_price(stock) return render_template('update.html', prices=Log.prices())
def yahoo(stock, symbol): print(stock, symbol) Price.get(stock).update({'yahoo': symbol}) return render_template('update.html', prices=Log.prices())