--- id: djangorestframework-datatables version: "0.7.2" license: MIT license_treatment: permissive maintenance: active --- # djangorestframework-datatables — Seamless integration between Django REST framework and Datatables (https://datatables.net) License: permissive · Maintenance: active · Downloads: 218.6K/mo ## 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 above — 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 pip install djangorestframework-datatables uv add djangorestframework-datatables 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: unspecified - Install friction: low - Maintenance: active - Downloads: 218.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django rest framework datatables, server-side datatables integration, django api datatables renderer, datatables json format django, datatables pagination filtering django, rest framework datatables filter, datatables compatible django api, datatables, django-integration, rest-api [View on SkillFed](https://skillfed.io/packages/djangorestframework-datatables) · [View on PyPI](https://pypi.org/project/djangorestframework-datatables/)