Library for creating HTML listing / table / data grid
Project description
Django app for building HTML listings / tables, it includes many features :
Any iterable, Django QuerySet or model can be used.
Most listings can be configured into a template file without touching a python file
A class-based ListingView is provided if you want to code a listing at python side
It as an Ajax mode to save requests to the server
Uses JQuery if ajax is activated
Customized for Bootstrap by default, but can be easily customized in many way (templates, icons, etc…)
You can select columns to display, columns title, default sorting etc..
Pagination is highly customizable (buttons to display, goto page, ellipsis, icons et labels)
Rows can be <div> instead of <tr>, so it is possible to format data in many ways
A lot of column types are provided, they are automatically created when a QuerySet or a model is provided
Columns are class-bases and one can create custom ones
Columns manage One-to-many, Many-to-many and foreign relations
Provides aggregation columns : sum, avg, min, max values
Provides page-level and global aggregation : sum, avg, min, max values displayed at listing last row
Provides columns to make a link to the object, a custom link, checkbox, select box, text input…
Provides “action column” that comes with many actions : show, edit, delete, move up, move down…
is able to manage multiple variations to present data in multiple way at the same place (text only listing, text+image listing, image only listing for example)
Uses Django translation framework : one can translate the listing as needed
Toolbars can be added at the top and/or at the bottom to make actions
Built-in toolbar action are : sorting, select a listing variation, number of rows per page, export data. They are customizable.
Toolbar items are class-based : one can create a custom one easily
django-listing can automatically create a filter form (aka search form)
Listing rows can be selectable in order to apply some actions
Listings can be editable for mass updates
django-listing can automatically create a form for inserting data to database
One can upload files/images into a listing, it uses DropzoneJS (Work in progress)
ListingView can manage itself database inserting, editing, deleting, filtering, uploads and actions : no need to develop any code for that.
django-listing comes with hundreds of icons as a scalable font
django-listing is faster than django-table2
Showcase
A demo is included in source code, you will need poetry to install python environment:
curl -sSL https://install.python-poetry.org | python3 -
Get the source code:
git clone https://github.com/elapouya/django-listing.git
To install the python envionment:
cd django_listing/showcase poetry install --no-root
Check you are in showcase/ directory, then start the Django from poetry environment:
poetry run python manage.py runserver 8123
A sqlite database is already included, you do not have to make any migration, just open your brower at http://localhost:8123
License
Django-listing is licensed under the GPLv3 license for all open source applications. A commercial license is required for all commercial applications or non-open applications
See LICENSE.rst file for more informations.
Documentation
Please, read the doc (Work in progress)
News
0.9.10 (2024-10-31)
Fix export toolbar item
0.9.9 (2024-10-16)
Do not override widget attribute data-related-model in forms
0.9.8 (2024-10-16)
Better filters form POST request data handling
Add has_nb_unfiltered_rows listing attribute
0.9.7 (2024-10-14)
Accept listings with filters.form_attrs = {“method”: “POST”}
0.9.6 (2024-10-11)
Bottom action buttons now works with accept_ajax=True
0.9.5 (2024-09-25)
Better mass-update management
0.9.4 (2024-09-23)
No form clean on mass delete in attached form
Add data-related-model in form fields html attributes if relevant
0.9.1 (2024-09-13)
Better mass update management : now dynamic checkboxes are displayed to choose fields to update
0.8.5 (2024-09-10)
If using django-modeltranslation, do not consider localized fields
0.8.4 (2024-09-05)
Raise exception when trying to add form errors in attached form proccessing
0.8.3 (2024-09-01)
Attached form can be sticky : add class “stick” to .attached-form-container
Remove attached form validation errors on row selection
Better css for attached form
0.7.40 (2024-08-26)
Improve BooleanColumn to manage not nullable booleans in attached forms
0.7.39 (2024-08-26)
Fix column form field parameters retrieval
0.7.38 (2024-08-08)
Auto show advanced filters if one or more are used
Update translation
0.7.37 (2024-07-23)
Add form_layout_advanced, and advanced button for filters form
0.7.36 (2024-07-17)
Add object-link css class on cells in link_object_columns
0.7.35 (2024-07-09)
Add extra spans in attached form buttons for better customization
0.7.34 (2024-07-08)
Add title in attached form buttons
0.7.33 (2024-07-05)
Better autocomplete filters management
0.7.32 (2024-07-03)
Attached form buttons can now be on several lines
0.7.31 (2024-07-02)
Initialize some dicts/lists in __init__
0.7.30 (2024-06-21)
Give the possibility to patch json response data via listing_patch_json_response_data(data) method to be put in view
Better ajax request context management
0.7.29 (2024-06-20)
Re-compute the current page records after processing attached form actions
0.7.28 (2024-06-14)
Add view context data on ajax rendering
0.7.27 (2024-05-24)
Sort SortSelectToolbarItem choices
Improve checkbox selection
Fix selection column to avoid duplicates
New empty msg management + some little fixes
0.7.26 (2024-05-14)
Add MultipleForeignKeyFilter
Fix filter reset button
Update showcase poetry env
0.7.25 (2024-04-29)
Add some manage_listing_attached_form_clean* methods
0.7.24 (2024-04-18)
Fix up & down icons in SortSelectToolbarItem to be displayed on Firefox
Add some documentions
0.7.23 (2024-04-18)
Add icons on buttons for filter form and attached form
0.7.21 (2024-04-16)
Update showcase poetry.lock
Update showcase installation documentation
0.7.20 (2024-04-15)
Many little fixes
Add a lot of documentation in the showcase
0.7.18 (2024-03-29)
Fix django_listing.js for autocomplete multi-select
Add some documentation
0.7.17 (2024-03-13)
Fix to get context processors executed during POST rendering
0.7.16 (2024-03-13)
Add widget_class and widget_params for Filter
Fix widget creation
Fix attached form reset button
0.7.15 (2024-03-12)
Add per-action attached form initial data
Trigger JS event on selection change
0.7.12 (2024-03-11)
Add qs-first & qs-last css class on relevant rows.
Add AutoCompleteColumn
Add attached_form customize method
0.7.11 (2024-03-01)
De-serialize data into UTF-8 in attached form.
0.7.10 (2024-02-29)
Fix #19
Fix action column
0.7.9 (2024-02-26)
Add export toolbar button permission
0.7.8 (2024-02-21)
Add spinner while exporting listing to file
Check export select file format to not be empty
Better default listing name
Exported file name has now a timestamp
0.7.7 (2024-02-20)
Sanitize strings for Excel export
Columns to be exported are now customizable
0.7.5 (2024-02-19)
Use base64 for attached form serialization encoding
0.7.4 (2024-02-16)
Fix attached_form auto-fill
0.7.3 (2024-02-08)
Add animation on attached_form insert
Fix pagination
0.7.2 (2024-02-08)
Improve insert button management in attached_form
0.7.1 (2024-02-07)
Fix group by
Add ModelMethodRef and RelatedModelMethodRef
0.7.0 (2024-02-02)
Add AttachedForm feature with ajax autofill and actions processing
0.6.4 (2024-01-18)
Improve listing insert form
add no_foreignkey_link to ManyColumn class
add range selection (press shift on second selection)
fix FloatColumn
fix gettext
fix group-by buttons
Many fixes when accept_ajax = True
Add “Group By” and annotations feature
0.5.17 (2023-11-28)
Add FloatFilter
Fix XSS issues on ForeignKeyColumns and LinkColumn
Improve get_absolute_url() usage
Improve default_value on Filter()
Add default_value on Filter()
Improve foreign key column title
Fix word search with filter_queryset_method
Fix listing export for Excel
Better focus when using Select2 widget
Strip HTML tags on data exports
Fix exception management for Django 4
Add add_one_day option on DateFilter
Fix unexpected SQL query with ListingVariations
Data Export works with active filters and ajax=True
Add filter_queryset_method filter attribute
Update fr translations
Add links in ManyColumn if get_absolute_url() exists on related objects
Add __url_func parameter for edit/delete/view action buttons
0.0.28 (2023-06-27)
Add AutocompleteMultipleForeignKeyFilter
Add ForeignKeyFilter and AutocompleteForeignKeyFilter
Added edit and delete action buttons
Fixed action button “see details” modal
Improved CSS for small device
Auto-detect many-to-many model fields if present in select_columns
Fixed choices widgets
Improved radio and checkbox in filter form
Fixed ModelColumns
Added LineNumberColumn()
Use scss to generate css files
Added showcase with many demo pages see showcase/README.rst
Fixed bad form closing
Fixed ListingVariation with Ajax
Added django-like filter syntax for sequences
Added JsonDateTimeColumn class
Added support for python 3.10
Added possibility to create custom action button linked with listing method
0.0.7 (2020-07-14)
First running version
0.0.1 (2018-02-03)
Skeleton commit
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
File details
Details for the file django_listing-0.9.10.tar.gz
.
File metadata
- Download URL: django_listing-0.9.10.tar.gz
- Upload date:
- Size: 712.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65f99194cbec3c9e66e2877894c79674a28b11bcd9329e6ddb28c0f7e87b63a4 |
|
MD5 | b104a51187308125763dc7d031a6e5d1 |
|
BLAKE2b-256 | 139f64878d3446d8e3900640632cd62922e6eab7d1938208fbb60ff96d915080 |
File details
Details for the file django_listing-0.9.10-py2.py3-none-any.whl
.
File metadata
- Download URL: django_listing-0.9.10-py2.py3-none-any.whl
- Upload date:
- Size: 780.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97a0d3e0fe071718866740f1233993cb4c5b32ca9f001350728ebfd202619e8 |
|
MD5 | d722855fc3e83f9888de0b4bb3f7c519 |
|
BLAKE2b-256 | d3877f7389d532434372fc23cd1debd7cbdbd93cb547e950e8637a8197b63cdc |