def display()

in app/blueprints/product_catalog/blueprint.py [0:0]


def display(auth_context):
    """
    View function for displaying the product catalog.

    Parameters:
       auth_context (dict): The authentication context of request.
                            See middlewares/auth.py for more information.
    Output:
       Rendered HTML page.
    """

    products = product_catalog.list_products()
    # Get promoted products recommended by the AutoML model.
    promos = product_catalog.get_promos()
    return render_template('product_catalog.html',
                           products=products,
                           promos=promos,
                           auth_context=auth_context,
                           bucket=product_catalog.BUCKET)