A Django app that integrates with DataTables.net javascript api.
Project description
Datatables
Datatables is a Django app that which gives the possibility to create views that integrates with the jQuery javascript library DataTables.
It also includes some features which makes it possible to export data to a csv from the table.
Installation
Add 'datatables' to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'datatables',
]
Usage
- Create a view:
from datatables.views import DatatableView
from someapp.models import MyModel
class ExampleView(DatatableView):
model = MyModel
columns = [
'field1',
'field2',
'custom_data',
]
def custom_data(self, obj):
return 'some custom data'
- Add css and js to template:
example.html
{% load datatables %}
<html>
<head>
{% css_bundle %}
</head>
<body>
{{ datatable }}
</body>
{% js_bundle %}
</html>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_datatablesview-0.10.1.tar.gz.
File metadata
- Download URL: django_datatablesview-0.10.1.tar.gz
- Upload date:
- Size: 148.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6d7f6100ae16156412c1fda668b56cc2000a8d3cb3c575ceb9f8adc770628e4
|
|
| MD5 |
2961804a6229482fa88d64146c5d9ce8
|
|
| BLAKE2b-256 |
d7e01d137833f074a8eabcfd57ae390a94255a7b38a1b5afbd5531eb7caab701
|
File details
Details for the file django_datatablesview-0.10.1-py3-none-any.whl.
File metadata
- Download URL: django_datatablesview-0.10.1-py3-none-any.whl
- Upload date:
- Size: 159.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c9cdb1682452a0c76372cab492423a91ba89bba7fec4c876d50d3ed9253f50
|
|
| MD5 |
34b96e3244ed403a7cc1c833a52aaca7
|
|
| BLAKE2b-256 |
9ca7bab2b4a3c3af539c8e33c3cad8bd04368a97d059d6b5a331c30459222b00
|