in app/blueprints/cart/blueprint.py [0:0]
def display(auth_context):
"""
View function for displaying the contents of the cart.
Parameters:
auth_context (dict): The authentication context of request.
See middlewares/auth.py for more information.
Output:
Rendered HTML page.
"""
cart = carts.get_cart(auth_context.get('uid'))
for item in cart:
product = product_catalog.get_product(item.item_id)
item.info = product
return render_template("cart.html",
cart=cart,
auth_context=auth_context,
bucket=product_catalog.BUCKET)