예제 #1
0
def store_seller(store_id):
    """
    store 销售人员

    """
    db = g._imdb

    offset = int(request.args.get('offset', 0))
    limit = int(request.args.get('limit', 10))

    rows_found = Seller.get_seller_count(db, store_id)
    sellers = Seller.get_page_seller(db, store_id, offset, limit)
    store_info = Store.get_store(db, store_id)

    g.pagination.setdefault()
    g.pagination.rows_found = rows_found
    g.pagination.limit = limit
    g.pagination.offset = offset

    return render_template('store/seller.html',
                           data={
                               'offset': offset,
                               'list': sellers,
                               'store_info': store_info,
                               'pagination': g.pagination,
                           })
예제 #2
0
파일: store.py 프로젝트: jzxyouok/kefu_web
def store_seller(store_id):
    """
    store 销售人员

    """
    db = g._imdb

    offset = int(request.args.get('offset', 0))
    limit = int(request.args.get('limit', 10))

    rows_found = Seller.get_seller_count(db, store_id)
    sellers = Seller.get_page_seller(db, store_id, offset, limit)
    store_info = Store.get_store(db, store_id)

    g.pagination.setdefault()
    g.pagination.rows_found = rows_found
    g.pagination.limit = limit
    g.pagination.offset = offset

    return render_template('store/seller.html',
                           data={'offset': offset,
                                 'list': sellers,
                                 'store_info': store_info,
                                 'pagination': g.pagination,
                                 })
예제 #3
0
    def new_alert(name, url, price_limit):
        store = Store.get_store(url)

        item = Item.new_item(url, store.tag_name, store.query)

        Alert(name, item._id, session['email'], item.price,
              price_limit).save_to_mongo()
예제 #4
0
파일: store.py 프로젝트: jzxyouok/kefu_web
def store_detail(store_id):
    """
    store 详情

    """
    db = g._imdb
    store_info = Store.get_store(db, store_id)

    return render_template('store/detail.html', data={'store_info': store_info})
예제 #5
0
def store_detail(store_id):
    """
    store 详情

    """
    db = g._imdb
    store_info = Store.get_store(db, store_id)

    return render_template('store/detail.html',
                           data={'store_info': store_info})