Django Dynamic Datatables
Project description
Django Dynamic DataTables
Open-source
library for Django that provides a powerful data table interface
(paginated information) with minimum effort - actively supported by AppSeed.
- Video presentation - explains
step-by-step
how to use it - Sample project - that implements the library
Features
- ✅ Modern Stack:
Django
&VanillaJS
- ✅
DT
layer provided by Simple-DataTables - ✅
Server-side
pagination - ✅ Search, Filters
- ✅ Exports in PDF, CSV formats
- ✅
MIT License
(commercial use allowed) - ✅ Active versioning & Free support
How to use it
Step #1 -
Install the package
$ pip install django-dynamic-datatb
// OR
$ pip install git+https://github.com/app-generator/django-dynamic-datatb.git
Step #2 - Update Configuration,
add new imports
import os, inspect
import django_dyn_dt
Step #3 - Update Configuration,
include the new APPs
INSTALLED_APPS = [
'django_dyn_dt', # <-- NEW App
]
Step #4 - Update Configuration, include the new
TEMPLATES
DIR
TEMPLATE_DIR_DATATB = os.path.join(BASE_DIR, "django_dyn_dt/templates") # <-- NEW App
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [TEMPLATE_DIR_DATATB], # <-- NEW Include
"APP_DIRS": True,
"OPTIONS": {
},
},
]
Step #5 - Update Configuration, update
STATICFILES_DIRS
DIR
DYN_DB_PKG_ROOT = os.path.dirname( inspect.getfile( django_dyn_dt ) ) # <-- NEW App
STATICFILES_DIRS = (
os.path.join(DYN_DB_PKG_ROOT, "templates/static"),
)
Step #6 -
Register the model
insettings.py
(DYNAMIC_DATATB section)
This sample code assumes that app1
exists and model Book
is defined and migrated.
DYNAMIC_DATATB = {
# SLUG -> Import_PATH
'books' : "app1.models.Book",
}
Step #7 -
Update routing
, include APIs
from django.contrib import admin
from django.urls import path, include # <-- NEW: 'include` directive added
urlpatterns = [
path("admin/", admin.site.urls),
path('', include('django_dyn_dt.urls')), # <-- NEW: API routing rules
]
Step #8 - Use the Dynamic Datatable module
If the managed model is Books
, the dynamic interface is /datatb/books/
and all features available.
Links & resources
- DRF - HOMEpage
- More Developer Tools provided by
AppSeed
- Ask for Support via
Email
&Discord
Django Dynamic DataTables - Open-source library provided by AppSeed
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
Hashes for django-dynamic-datatb-1.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c8d0abffb29dd4064fef3ba2037dee776c08834cedf603ca15bc7bf9c784c32 |
|
MD5 | a4b5bd0dc21438b8daf914ca534eaea7 |
|
BLAKE2b-256 | f4133f78f24e005b79cf0eb6d22277ce9cf6d60864f45e11155cca56e027409b |