{"id":21134,"library":"dj-datatables-view","title":"dj-datatables-view","description":"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.","status":"active","version":"0.1.8","language":"python","source_language":"en","source_url":"https://github.com/shanbay/dj-datatables-view","tags":["django","datatables","server-side","jquery"],"install":[{"cmd":"pip install dj-datatables-view","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for the view and ORM integration","package":"Django","optional":false},{"reason":"This is a fork of that package, but users should install dj-datatables-view instead","package":"django-datatables-view","optional":true}],"imports":[{"note":"The official module is 'dj_datatables', not 'dj_datatables_view'","wrong":"from dj_datatables_view import DatatableView","symbol":"DatatableView","correct":"from dj_datatables.views import DatatableView"},{"note":null,"wrong":null,"symbol":"DatatableFilterView","correct":"from dj_datatables.views import DatatableFilterView"}],"quickstart":{"code":"# models.py\nfrom django.db import models\n\nclass Person(models.Model):\n    name = models.CharField(max_length=100)\n    age = models.IntegerField()\n\n# views.py\nfrom dj_datatables.views import DatatableView\nfrom .models import Person\n\nclass PersonListView(DatatableView):\n    model = Person\n    columns = ['name', 'age']\n\n# urls.py\nfrom django.urls import path\nfrom .views import PersonListView\n\nurlpatterns = [\n    path('people/data/', PersonListView.as_view(), name='person_list'),\n]\n\n# template.html\n<table id=\"my-table\" class=\"table\">\n  <thead>\n    <tr>\n      <th>Name</th>\n      <th>Age</th>\n    </tr>\n  </thead>\n</table>\n<script>\n$(document).ready(function() {\n    $('#my-table').DataTable({\n        serverSide: true,\n        ajax: '{% url \"person_list\" %}',\n        columns: [\n            { data: 'name' },\n            { data: 'age' }\n        ]\n    });\n});\n</script>","lang":"python","description":"Basic setup integrating with DataTables server-side processing."},"warnings":[{"fix":"Use 'from dj_datatables.views import DatatableView'","message":"Do not confuse with 'django-datatables-view' (original). Import path is 'dj_datatables', not 'dj_datatables_view'.","severity":"gotcha","affected_versions":"all"},{"fix":"Define columns as list of strings in the same order as your DataTable JS column definitions.","message":"The 'columns' attribute must match DataTables column definitions exactly, including ordering and names.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider migrating to modern alternatives like 'django-datatables' or custom DRF endpoints.","message":"Python 3.5-3.9 support is likely dropped in practice; library requires Python >=3.5 but unmaintained since 2021.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from dj_datatables.views import DatatableView'","cause":"Incorrect import path; the module is 'dj_datatables', not 'dj_datatables_view'.","error":"ImportError: No module named 'dj_datatables_view'"},{"fix":"Add 'columns = [...]' to your view class, e.g., columns = ['name', 'age']","cause":"Columns attribute missing or not defined in the view class.","error":"AttributeError: 'DatatableView' object has no attribute 'columns'"},{"fix":"Check that you are not overriding __init__ incorrectly; use standard queryset configuration.","cause":"Passing unsupported arguments to the view or model manager.","error":"TypeError: __init__() got an unexpected keyword argument 'ordering'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}