Create Customer Page
ក្រោយ​ពី​មាន​ទំព័រ​មុខ ដែល​ជា​ទំព័រ​ស្តី​ពី​ទិន្នន័យ​នៃ​ទោចក្រយាន​ត្រូវ​ដាក់​ជួល​រួច​ហើយ​។ យើង​អាច​ចាប់​ផ្តើម​បង្កើត​ទំព័រ​ទិន្នន័យ​នៃ​អតិថិជន​ដែល​ជា​អ្នក​ជួល​កង់​បាន ដោយ​ធ្វើ​ដូច​ខាង​ក្រោម​នេះ៖
1
2
3
4
5
6
7
#\controllers\customer.py
import config, re, json
from bottle import template, route, request, redirect
 
@route('/customer')
def displayCustomer():
  return template('customer', data=config.kargs)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!--\views\customer.tpl-->
 
%include("./partials/header.tpl")
 
<div class="main" id="main">
  <div class="content" id="content">
    <div class="top-widget">
    <span>CUSTOMERS</span><input onclick="location.href='/custform'" type="button" value="Add Customer">
    </div>
     
  </div><!--content-->
</div><!--main-->
 
%include("./partials/footer")

GitHub: https://github.com/Sokhavuth/Rental-Bicycle-App
Heroku: https://khmerweb-rba.herokuapp.com/