[Answer]-Pagination in django mezzanine

1👍

Take a look at blog_post_list here: https://bitbucket.org/stephenmcd/mezzanine/src/902687d2753c449de31d4f615a3bf785ce914e96/mezzanine/blog/views.py?at=default#cl-16 and the associated template here https://bitbucket.org/stephenmcd/mezzanine/src/902687d2753c449de31d4f615a3bf785ce914e96/mezzanine/blog/templates/blog/blog_post_list.html?at=default

The proper usage is to use paginate in the view and then call {% pagination_for blog_posts %} where blog_posts is the return value of paginate. You don’t need to worry about the parser, token, context etc… in the template tag, it is pulled in automatically.

Leave a comment