A Django library for sortable TabularInline in admin interface
Project description
django_sortable_tabular
django_sortable_tabular is a simple and lightweight Django library that enables column sorting for fields displayed in TabularInline in the Django admin panel.
Author
Michał Konwiak GitHub.
Features
- Column sorting for
TabularInlineusing JavaScript and Django. - Multi-column sorting with adjustable sort direction (ascending/descending).
- Seamless integration with the Django admin interface through the
SortableTabularInlineclass.
Requirements
- Python 3.8+
- Django 3.2+
Installation
-
Install the library using
pip:pip install django_sortable_tabular
-
Add a package to INSTALLED_APPS section.
INSTALLED_APPS = [ # another apps 'django_sortable_tabular', ]
-
Define a class that extends the
SortableTabularInlineclass and use it as you would a standard inline class. Here’s an example:class CommentAdmin(SortableTabularInline): model = Comment class PostAdmin(admin.ModelAdmin): list_display = ( "title", "text", "picture", "author" ) inlines = [ CommentAdmin ]
-
Run
python manage.py collectstatic -
Run server and enjoy
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_sortable_tabular-0.1.1.tar.gz.
File metadata
- Download URL: django_sortable_tabular-0.1.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1d5beef345cd4464b73657cfcfe4cca7ecad5a70b3d075e0d7a9015723d22d0
|
|
| MD5 |
cc2d2bc07b82683c3898bed9fa94216c
|
|
| BLAKE2b-256 |
b370f25e606bff682a440914fa5328e74318b301a6d08c22fa17c25fd21aafbe
|
File details
Details for the file django_sortable_tabular-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_sortable_tabular-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58c5c9c47ac8748a46945a033f322c395d89e387f36dc2d2f50fea1e51a198e0
|
|
| MD5 |
0ef1bb0b7e4af3771399647c7e27f28b
|
|
| BLAKE2b-256 |
487b3201be71249f33baf5d4dabdb390b01d405268edd437ac045ef8481906ee
|