Skip to content

Instantly share code, notes, and snippets.

View raffaeletani's full-sized avatar

Raffaele Tani raffaeletani

View GitHub Profile
@raffaeletani
raffaeletani / pagination.py
Last active September 28, 2020 16:40 — forked from mikeboiko/pagination.py
Django Rest Framework Pagination integration with Vuetable-2
# =======================================================================
# === Description ...: Integrate DRF with VueTable-2
# === Author ........: Mike Boiko
# === Fork by .......: Raffaele Tani, encapsulated pagination in link node, added support for non int indexes
# =======================================================================
# If you want to integrate Django Rest Pagination with VueTable, you must
# change the pagination as shown below:
# Then, in your views.py file, the pagination_class must be set to CustomPagination
# See example below: