Django Auto Datatables is a high-level API for creating datatables(.net) in Django. It provides a simple API for creating interactive datatables with minimal effort. The package supports all the features of datatables.net and allows for easy customization of the datatable. It also supports server-side processing and the scroller plugin for large API driven datatables.
The full documentation is at https://ssjenny90.github.io/django-auto-datatables/
Install Django Auto Datatables::
pip install django-auto-datatables
Add it to your INSTALLED_APPS
:
INSTALLED_APPS = (
...
'auto_datatables',
...
)
Django Auto Datatables also has an option dependencies on DRF ORJSON Renderer. If you are serializing large amounts of data and want the speed the comes with ORJSON, you can install it with the following command.
pip install django-auto-datatables[orjson]
Usage examples and guides on how to use your package in a Django project.
Configuration options and settings available in your package.
AutoTableMixin:
This package provides a single template which is called if the render_table
template tag is used without arguments. The template is located at auto_datatables/table.html
and can be overridden by creating a template with the same name in your project.
Django Auto Datatables provides the following template tags:
render_table
: This tag can be used to render a datatable in a template. The tag accepts the current context and expects a number of variables to be present. Make sure to subclass any view with the BaseViewMixin to ensure the correct variables are present in the context.
AUTO_DATATABLES_DEFAULT_RENDERER = 'auto_datatables.renderers.DatatablesRenderer'
- The default renderer to use when rendering the datatable. Defaults to 'auto_datatables.renderers.DatatablesRenderer'.
Contributor guidelines can be found in the How to Contribute file.
This project is provided under the MIT License.
Change Log is a log of changes made to the package. It is based on Keep a Changelog.
A section to provide information about where users can get support for your package and how they can contact you for inquiries or issues.
- Simple API for creating interactive datatables
- Allows for easy customization of the datatable
- Supports all the features of datatables.net
- Supports server-side processing
- Templated row output
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
pip install -r requirements_dev.txt
invoke -l
Django Auto Datatables relies heavily on previous work by the following projects: