Advertisement
Guest User

Untitled

a guest
Dec 17th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. @post('/buy')
  2. def buy():
  3. name = order.name = request.params.name
  4. address = order.address = request.params.add
  5. phone = order.phone = request.params.phone
  6. sel = order.carpet_sel = request.params.typ
  7. col = order.carpet_col = request.params.color
  8. pad = order.pad = request.params.pad
  9. l = str(request.params.lenght)
  10. w = str(request.params.width)
  11. area = order.area = int(l)*int(w)
  12. iDate = order.iDate = request.params.date
  13. order.iCost = cost()
  14. order.tax = 0
  15. order.totalcost = order.iCost + install(request.params.miles)
  16.  
  17. return template('output.tpl',name=name,address=address,sel=sel,col=col,pad=pad,l=l,w=w
  18. ,area=area,iDate=iDate,cost=order.iCost,tax=order.tax,total=order.totalcost,phone=phone)
  19.  
  20. @route('/buying')
  21. def buying():
  22. session = Session()
  23. o = order
  24. session.add(o)
  25. session.commit()
  26. del(o)
  27. return template("thanks.tpl")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement