def get(self): try: stores = Store.find_all() stores_dic = [store.json() for store in stores] return {'stores': stores_dic}, 200 except: return {'message': 'An error occurred reading data.'}, 500
def index(): stores = Store.find_all() return render_template("stores/index.html", stores=stores)
def get(self): return [store.json() for store in Store.find_all()]