Hello.I used web2py_utils package to display paging.

in controller:
def weblog():
    query= db.post.id > 0
    orderby = ~db.post.created_on
    paginate = web2py_utils.paginate.Pagination(db, query, orderby 
,display_count=2,r=request,
                            res=response)
    posts=paginate.get_set(set_links=True)
    
    return dict(posts=posts)


in view:

  <!-- Pagination -->
          <ul class="pagination justify-content-center mb-4">
            <li class="page-item">
                <div class="page-link">
                     {{=response.paginate_links[0]}}
                </div>
            </li>
            <li style="padding:5px 10px;border:2px solid 
gray;border-radius:5px;background-color:#f6f6f6;">{{=response.paginate_links[2]}}</li>
            <li class="page-item">
                <div class="page-link">
                    {{=response.paginate_links[1]}}
                </div>
            </li>
          </ul>


result:
I added a screenshot



I'm going to translate or replace outgoing strings. For example, I want 
next() to be «بعدی».Thanks for advising how to change this string.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to