{"id":21145,"library":"django-datatables-view","title":"django-datatables-view","description":"A Django library that provides server-side processing for DataTables jQuery plugin with minimal configuration. Version 1.20.0 supports Django 5.0, last updated in 2023. Release cadence is sporadic.","status":"active","version":"1.20.0","language":"python","source_language":"en","source_url":"https://github.com/piontas/django-datatables-view","tags":["django","datatables","server-side","jquery-plugin"],"install":[{"cmd":"pip install django-datatables-view","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required runtime dependency, version >=2.2","package":"django","optional":false}],"imports":[{"note":"Old pattern used 'datatables_view' module, now it's 'datatableview.views'","wrong":"from datatables_view import DatatableView","symbol":"DatatableView","correct":"from datatableview.views import DatatableView"},{"note":"X_DSW is a helper class inside views module, not top-level","wrong":"from datatableview import X_DSW","symbol":"X_DSW","correct":"from datatableview.views import X_DSW"}],"quickstart":{"code":"# views.py\nfrom datatableview.views import DatatableView\nfrom .models import MyModel\n\nclass MyModelDatatableView(DatatableView):\n    model = MyModel\n    columns = ['id', 'name', 'created_at']\n\n# urls.py\nfrom django.urls import path\nfrom .views import MyModelDatatableView\n\nurlpatterns = [\n    path('datatable/', MyModelDatatableView.as_view(), name='datatable'),\n]","lang":"python","description":"Minimal setup: define a view subclass, specify model and columns, then wire URL."},"warnings":[{"fix":"Update imports: from datatableview.views import DatatableView","message":"In version 1.10.0, the import path changed from 'datatables_view' to 'datatableview.views'. Old imports will break.","severity":"breaking","affected_versions":"<1.10.0"},{"fix":"Use 'columns' instead of 'display_fields' in your view.","message":"The 'display_fields' attribute is deprecated in favor of 'columns'. 'display_fields' may be removed in future.","severity":"deprecated","affected_versions":">=1.15.0"},{"fix":"Use 'column_defs' dict in view to map DataTables column indices to model fields.","message":"The library expects the URL's GET parameters to match DataTables' built-in parameters exactly. If you use a custom column name, you must map it via 'column_defs'.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure your URL pattern has a name attribute and is referenced correctly in templates.","cause":"Missing URL name or misconfigured urls.py","error":"NoReverseMatch at /datatable/"},{"fix":"Add 'model = MyModel' inside your DatatableView subclass.","cause":"Forgetting to set 'model' attribute on the view","error":"AttributeError: 'MyModelDatatableView' object has no attribute 'model'"},{"fix":"Verify that each column name corresponds to a model field, property, or annotate() expression.","cause":"Column name in 'columns' doesn't match a model field or annotated expression","error":"Column 'name' not found on model"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}