Skip to content

Instantly share code, notes, and snippets.

View NekoTashi's full-sized avatar

Christopher Rubio Márquez NekoTashi

View GitHub Profile
@NekoTashi
NekoTashi / seed_pagination.py
Created November 9, 2017 19:41 — forked from bendavis78/seed_pagination.py
Example implementation of randomized pagination in django and django-rest-framework
"""
Adds a `seed` paramter to DRF's `next` and `prev` pagination urls
"""
from rest_framework import serializers
from rest_framework import pagination
from rest_framework.templatetags.rest_framework import replace_query_param
from . import utils