Q. | Is there a way to implement page numbers for generic list views? |
A. | Yes. Django provides the paginate_by argument to generic list views to implement a pagination system. The pagination information can be accessed in the templates through page, pages, last_on_page, first_on_page, previous, next, has_next, has_previous, hits, and results_per_page. |
Q. | Is there a way to access functions from generic views? |
A. | Yes. If you pass a function as a member of the extra_context dictionary argument, it is evaluated just before it is passed to the template. |