skillfed

djangorestframework-datatables

Seamless integration between Django REST framework and Datatables (https://datatables.net)

djangorestframework-datatables v0.7.2 218.6K downloads/30d#9,339 on PyPI398
Permissive license MIT Active released

What it is and what it does

This package bridges Django REST Framework and the Datatables JavaScript library by providing a custom renderer and filter backend that translate Datatables' server-side request format into DRF-compatible queries. When you add the DatatablesRenderer to your REST_FRAMEWORK settings and call your existing API with `?format=datatables`, it returns JSON structured exactly as Datatables expects, handling search terms, column filters, sort order, and pagination automatically.

Your API remains unchanged and fully functional for non-Datatables clients—the Datatables format is opt-in via the query parameter. The package handles field serialization, nested relationships, and provides configuration options like `datatables_always_serialize` to control which fields appear in the response regardless of client requests.

Use it for:

  • Render Django model data in an interactive HTML table with server-side search, sort, and pagination without writing a separate API.
  • Add Datatables UI to an existing Django REST Framework API by enabling the format parameter on current viewsets.
  • Filter and display related model fields (e.g., artist.name) in a Datatables column with automatic ORM query handling.
  • Support POST requests from Datatables clients while keeping the same API endpoint for GET requests.
  • Optimize large dataset display by offloading pagination and filtering to the server instead of loading all rows client-side.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds server-side Datatables support to Django REST Framework APIs, enabling searching, filtering, ordering, and pagination through a single `?format=datatables` query parameter.

Yes. This package solves a specific, common problem—integrating Datatables with Django REST Framework—with low install friction, active maintenance, no known vulnerabilities, and a permissive license. It's production-stable (Development Status 5) and widely used (top 15000 PyPI packages). Install it if you need server-side Datatables support for a DRF project.

Install

djangorestframework-datatables on PyPI

pip

pip install djangorestframework-datatables

uv

uv add djangorestframework-datatables

poetry

poetry add djangorestframework-datatables

Installing djangorestframework-datatables

Before you install

Low friction: pure Python wheel with a single runtime dependency (djangorestframework). Actively maintained with recent releases; last commit 2026-06-24 and version 0.7.2 released 2024-06-14 with Django 5.0/5.1 support.

License in practice

MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install djangorestframework-datatables

# In Django settings.py, add to INSTALLED_APPS:
# 'rest_framework_datatables'

# Configure REST_FRAMEWORK with DatatablesRenderer, DatatablesFilterBackend, and DatatablesPageNumberPagination

# Call your API with ?format=datatables to get Datatables-compatible JSON

Requires Django (3.2, 4.1, 4.2, 5.0, 5.1) and Django REST Framework (3.14) to be installed and configured.

Verify before relying

  • Whether the package works with Django REST Framework versions other than 3.14, or if 3.14 is the only supported version.
  • Performance characteristics when handling large result sets or complex nested serializers.
  • Compatibility with custom Datatables client-side plugins beyond the documented YADCF example.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — djangorestframework
Maintenance actively maintained — 791 days since the last release
Last repo commit
First released
Downloads 218,560/month — #9,339 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: djangorestframework_datatables-0.7.2-py2.py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 3.2Framework :: Django :: 4.1Framework :: Django :: 4.2Framework :: Django :: 5.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP

Tags

django rest framework datatablesserver-side datatables integrationdjango api datatables rendererdatatables json format djangodatatables pagination filtering djangorest framework datatables filterdatatables compatible django api
datatablesdjango-integrationrest-api

More WWW/HTTP packages

urllib3

urllib3 is an HTTP client library that provides…

permissive · top 100 on PyPI

requests

Requests is a Python HTTP library that…

permissive · top 100 on PyPI

h11

h11 is a pure-Python HTTP/1.1 protocol…

permissive · top 100 on PyPI

httpx

HTTPX is a fully featured HTTP client library…

permissive · top 100 on PyPI

httpcore

A minimal low-level HTTP client library that…

permissive · top 100 on PyPI

aiohttp

aiohttp is an async HTTP client and server…

permissive · top 100 on PyPI

dj-datatables-view

Provides a Django base view for server-side…

permissive · top 15,000 on PyPI

djangorestframework-jsonapi

Adapts Django REST framework to output…

permissive · top 15,000 on PyPI

django-datatables-view

Provides a Django view base class that handles…

permissive · top 15,000 on PyPI

django-elasticsearch-dsl-drf

Provides Django REST framework views,…

copyleft · top 15,000 on PyPI

djangorestframework-filters

Extends Django REST Framework with advanced…

permissive · top 15,000 on PyPI

django-filter

Django-filter adds dynamic QuerySet filtering…

permissive · top 5,000 on PyPI

django-cursor-pagination

Implements cursor-based pagination for Django…

permissive · top 15,000 on PyPI

djangorestframework

Builds web APIs on top of Django with…

permissive · top 1,000 on PyPI

djangorestframework-csv

Adds CSV rendering and parsing capabilities to…

permissive · top 5,000 on PyPI

djangorestframework-yaml

Adds YAML parsing and rendering support to…

permissive · top 15,000 on PyPI