Пример #1
0
def product_list():
    cate_id = request.args.get("category_id")
    kw = request.args.get("kw")
    from_price = request.args.get("from_price")
    to_price = request.args.get("to_price")
    products = utils.read_products(category_id= cate_id, kw=kw,from_price=from_price,to_price=to_price)

    return render_template('products.html', products=products)
Пример #2
0
def product_list():
    cate_id = request.args.get('category_id')
    kw = request.args.get('kw')
    tuGia = request.args.get('tugia')
    denGia = request.args.get('dengia')

    products = utils.read_products(cate_id, kw, tuGia, denGia)

    return render_template('products.html', products=products)
Пример #3
0
def product_list():
    cate_id = request.args.get('category_id')
    kw = request.args.get('kw')
    from_price = request.args.get('from_price')
    to_price = request.args.get('to_price')
    products = utils.read_products(cate_id=cate_id,
                                   kw=kw,
                                   from_price=from_price,
                                   to_price=to_price)

    return render_template('product-list.html', products=products)
Пример #4
0
 def indexpn(self):
     err_msg = ""
     sach = utils.read_products()
     if request.method == 'POST':
         ngay = request.form.get("date")
         soluong = request.form.get('soLuong')
         idsach = request.form.get('idsach')
         if utils.nhap_sach(ngaynhap=ngay, soluong=soluong, idsach=idsach):
             err_msg = "Nhập Sách Thành Công!"
         else:
             err_msg = "Nhập Không Thành công!"
     return self.render('admin/product.html', sach=sach, err_msg=err_msg)
Пример #5
0
def shop():
    cate_id = request.args.get('category_id')
    kw = request.args.get('kw')
    products = utils.read_products(cate_id=cate_id, kw=kw)

    return render_template('shop.html', products=products)
Пример #6
0
 def index(self):
     cate_id = request.args.get('category_id')
     kw = request.args.get('kw')
     products = utils.read_products(cate_id=cate_id, kw=kw)
     return self.render('admin/contact.html', products=products)