示例#1
0
def pay(id):
    import hciu1.model.product as product
    title, price, date = product.get_product(id)
    total_price = local.request.form.get("total_price", "Hovsa")
    template_response("/pay.mako",
        total_price = total_price
    )
示例#2
0
def show_product(id):
    import hciu1.model.product as product
    title, price, date = product.get_product(id)
    template_response("/schubert.mako",
        id = id,
        title = title,
        price = price,
        date = date
    )
示例#3
0
def payment(id):
    import hciu1.model.product as product
    order_count = local.request.form.get("order_count", 1)
    try:
        order_count = int(order_count)
        if order_count < 1:
            raise ValueError
    except ValueError:
        order_count = 1

    title, price, date = product.get_product(id)

    template_response("/payment.mako",
        order_count = order_count,
        id=id,
        title = title,
        price = price
    )