Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @post('/buy')
- def buy():
- name = order.name = request.params.name
- address = order.address = request.params.add
- phone = order.phone = request.params.phone
- sel = order.carpet_sel = request.params.typ
- col = order.carpet_col = request.params.color
- pad = order.pad = request.params.pad
- l = str(request.params.lenght)
- w = str(request.params.width)
- area = order.area = int(l)*int(w)
- iDate = order.iDate = request.params.date
- order.iCost = cost()
- order.tax = 0
- order.totalcost = order.iCost + install(request.params.miles)
- return template('output.tpl',name=name,address=address,sel=sel,col=col,pad=pad,l=l,w=w
- ,area=area,iDate=iDate,cost=order.iCost,tax=order.tax,total=order.totalcost,phone=phone)
- @route('/buying')
- def buying():
- session = Session()
- o = order
- session.add(o)
- session.commit()
- del(o)
- return template("thanks.tpl")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement