=======================
Make django admin lists easier to sort with jQuery and Grappelli.
This plugin turns an ordinary order field into a high-powered sorting tool including:
* Drag-and-Drop
* Jump to Top and Jump to Bottom buttons
* Jump one up and Jump one bottom
* Send directly to a position in the list
* Sort by a custom field
For inline admin forms:
* Adjust table headers so they line up with the actual columns
* Make table headers sortable, so you can sort by a particular field (supports sorting by text inputs, text areas, check boxes, image uploads, and fks)
* Positioning order buttons anywhere in the table


Requirements
=====
Requires Django and django-grappelli
Usage
=====
1. pip install django-inline-wrestler
2. Add 'django_inline_wrestler' to your INSTALLED_APPS list in your project's settings.py
```python
from django_inline_wrestler.admin import TabularInlineOrderable, AdminListOrderable
from .models import *
class ItemInline(TabularInlineOrderable):
"""
To bring drag-and-drop functionality to an inline:
"""
model = Item
fields = ('order', 'name', 'txtid', 'description')
prepopulated_fields = {'txtid': ('name',)}
class SubItemInline(TabularInlineOrderable):
"""
To bring drag-and-drop functionality to an inline, sorting on a custom field:
"""
model = SubItem
fields = ('position', 'name', 'txtid')
prepopulated_fields = {'txtid': ('name',)}
#To override which field is used for ordering, add a class starting with order-by-[fieldname]. Make sure to also include
classes = ['django-inline-wrestler', 'order-by-position']
#Add any of the following css classes to this list to disable any of the buttons:
#'inline-wrestler-drag-disabled', 'inline-wrestler-move-disabled',
#'inline-wrestler-move-bottom-disabled', 'inline-wrestler-move-top-disabled',
#'inline-wrestler-move-up-disabled', 'inline-wrestler-move-down-disabled',
#'inline-wrestler-jump-disabled'
class ObjectAdmin(AdminListOrderable):
"""
To bring drag-and-drop functionality to a changelist view:
"""
model = Object
fields = ('priority', 'title')
list_editable = ('priority',)
change_list_template = 'admin/django_inline_wrestler/change_list.html'
custom_list_order_by = 'priority'
inlines = [ItemInline, SubItemInline]
```
Metadata
Release files for django-inline-wrestler 5.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-inline-wrestler-5.4.tar.gz | 12.2 kB | Without provenance | Details for django-inline-wrestler-5.4.tar.gz |
Release files / django-inline-wrestler-5.4.tar.gz
| Download URL | django-inline-wrestler-5.4.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b59b35ac12aaf1bdb18844292e30cc3e1b2fc283e09d8fc708f49e2943cba735
|
|
BLAKE2b-256 checksum How to use checksums |
7141924d851d51afdf07d5e47edca50ff8fd8f17d2cbd076bec38b90a334bede
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-inline-wrestler 5.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.