Registry / web-framework / dj-datatables-view

dj-datatables-view

JSON →
library0.1.8pypypiunverified

A Django library that provides a view for rendering DataTables with server-side processing. Fork of django-datatables-view. Current version 0.1.8, release cadence is low. Requires Python >=3.5,<4.0.

pip install dj-datatables-view
INSTALL
IMPORT
SIG · DJ-DATATABLES-VIEW
D
dj-datatables-view
web-frameworkpythonv0.1.8
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DatatableView
from dj_datatables_view.views import DatatableView
from dj_datatables.views import DatatableView

Basic setup integrating with DataTables server-side processing.

# models.py from django.db import models class Person(models.Model): name = models.CharField(max_length=100) age = models.IntegerField() # views.py from dj_datatables.views import DatatableView from .models import Person class PersonListView(DatatableView): model = Person columns = ['name', 'age'] # urls.py from django.urls import path from .views import PersonListView urlpatterns = [ path('people/data/', PersonListView.as_view(), name='person_list'), ] # template.html <table id="my-table" class="table"> <thead> <tr> <th>Name</th> <th>Age</th> </tr> </thead> </table> <script> $(document).ready(function() { $('#my-table').DataTable({ serverSide: true, ajax: '{% url "person_list" %}', columns: [ { data: 'name' }, { data: 'age' } ] }); }); </script>
Debug
Known issues
gotchaDo not confuse with 'django-datatables-view' (original). Import path is 'dj_datatables', not 'dj_datatables_view'.
fix
Use 'from dj_datatables.views import DatatableView'
affects: all
gotchaThe 'columns' attribute must match DataTables column definitions exactly, including ordering and names.
fix
Define columns as list of strings in the same order as your DataTable JS column definitions.
affects: all
deprecatedPython 3.5-3.9 support is likely dropped in practice; library requires Python >=3.5 but unmaintained since 2021.
fix
Consider migrating to modern alternatives like 'django-datatables' or custom DRF endpoints.
affects: all
Upgrade
Version history
0.1.8latest on PyPI · released Feb 24, 2022
Audit
Dependencies
DjangorequiredRequired for the view and ORM integration
django-datatables-viewoptionalThis is a fork of that package, but users should install dj-datatables-view instead
Agent activity
4 hits · last 30 days
node
4
Resources
dj-datatables-view — pip install dj-datatables-view · libregistry