1 2 3 4 5 6 7 8 9 10 11 | #\controllers\customer.py import config, re, json from bottle import template, route, request, redirect @route ( '/customer' ) def displayCustomer(): return template( 'customer' , data = config.kargs) @route ( '/custform' ) def getCustomerForm(): return template( 'custform' , data = config.kargs) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <!--\views\custform.tpl--> %include("./partials/header.tpl") < style > #custform{ margin-top: 30px; width: 30%; display: grid; grid-template-columns: auto calc(85% - 5px); grid-gap: 5px; } #custform a{ text-align: right; } </ style > < div class = "main" id = "main" > < div class = "content" id = "content" > < span >CUSTOMER ENTRY FORM</ span > < form id = "custform" method = "POST" action = "/customer" onsubmit = "return bicycle.customerForm('custform')" > < a >Name:</ a >< input name = "fname" type = "text" required = "" > < a >Phone:</ a >< input name = "fphone" type = "text" required = "" > < a ></ a >< input type = "submit" > </ form > </ div > <!--content--> </ div > <!--main--> %include("./partials/footer") |
GitHub: https://github.com/Sokhavuth/Rental-Bicycle-App
Heroku: https://khmerweb-rba.herokuapp.com/