html
{% if vendor_page != 1 %} {% endif %} {% for i in range(1, page_total + 1) %} { {i}} {% endfor %} {% if vendor_page != page_total and page_total%} {% endif %}共{ { total }}家 ({% if total %}{ { start}}{% else %}0{% endif %}-{% if vendor_page < page_total%}{ { vendor_page * count }}{% else %}{ { total }}{% endif %}) 显示
<input name="current_page" id="current_page" value={
{ current_page }} type="hidden"></input> <input name="count" id="count" value={ { count }} type="hidden"></input>python
#pagination
current_page = int(params['current_page']) count = int(params['count']) start = (current_page - 1) * count params['start'] = start second_level_url = params['second_level_url'] params['op'] = "getVendorProducts" params['count'] = count vendor_cars, car_total = rpc('vendor', params) page_total = int(ceil(float(car_total) / count))