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 App-Generator.
- Django Dynamic DataTables - video presentation
For a complete set of features and long-term support, check out Dynamic Django, a powerful starter that incorporates:
- Dynamic DataTables: using a single line of configuration, the data saved in any table is automatically managed
- Dynamic API: any model can become a secure API Endpoint using DRF
- Dynamic Charts: extract relevant charts without coding all major types are supported
- CSV Loader: translate CSV files into Django Models and (optional) load the information
- Powerful CLI Tools for the GIT interface, configuration editing, updating the configuration and database (create models, migrate DB)
Features
- Modern Stack:
Django
&VanillaJS
DT
layer provided by Simple-DataTablesServer-side
pagination- Search, Filters
- Exports in PDF, CSV formats
MIT License
(commercial use allowed)
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 App-Generator
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
File details
Details for the file django-dynamic-datatb-1.0.26.tar.gz
.
File metadata
- Download URL: django-dynamic-datatb-1.0.26.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0abdb37e4fa5d71c7ff395624f55cbc508076b6309e1bf9aeb1afac9cdb0fab3
|
|
MD5 |
efe877599ee93481ea8b873347c2f14b
|
|
BLAKE2b-256 |
8a9d555fa4727b970d566d697368e91a52033fcd5b8bf9d19b048875e692620e
|