def my_wish(): uid = current_user.id wishes_list = Wish.get_user_wishes(uid) wishes_isbn = [gift.isbn for gift in wishes_list] wishes_gifts_count = Wish.get_gifts_count(wishes_isbn) my_wishes_view_model = MyTrades(wishes_list, wishes_gifts_count) return render_template('my_wish.html', wishes=my_wishes_view_model.trades)
def my_wish(): uid = current_user.id wishes_of_mine = Wish.get_user_wishes(uid) isbn_list = [wish.isbn for wish in wishes_of_mine] gift_count_list = Wish.get_gifts_count(isbn_list) view_model = MyWishes(wishes_of_mine, gift_count_list) return render_template('my_wish.html', wishes=view_model.gifts)
def my_wish(): # 1,wish表查wishes # 2.isbn_list # 3,gift表查x人要送 wishes = Wish.get_wishes_by(current_user.id) isbn_list = [wish.isbn for wish in wishes] gifts_count = Wish.get_gifts_count(isbn_list) my_wishes = MyWishes(wishes, gifts_count) return render_template('my_wish.html', wishes=my_wishes.wishes)
def my_wish(): trades_of_mine = Wish.get_user_wishes(current_user.id) isbn_list = [trade.isbn for trade in trades_of_mine] trades_count_list = Wish.get_gifts_count(isbn_list) view_model = MyWishes(trades_of_mine, trades_count_list) return render_template('my_wish.html', wishes=view_model.trades)
def my_wishes(): uid = current_user.id my_wishes = Wish.get_user_wishes(uid) my_wishes_count = Wish.get_gifts_count(my_wishes) view_model = MyTrades(my_wishes, my_wishes_count) return render_template('my_wish.html', wishes=view_model.trades)