django-admin-sortable | Generic drag-and-drop ordering | Widget library
kandi X-RAY | django-admin-sortable Summary
kandi X-RAY | django-admin-sortable Summary
This project makes it easy to add drag-and-drop ordering to any model in Django admin. Inlines for a sortable model may also be made sortable, enabling individual items or groups of items to be sortable.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Displays jquery javascript .
- Render the change list .
- Define a dynamic regroup template tag .
- Render the target variable .
- Return a filtered queryset of objects .
- Get the version number .
- Check if the model is sortable .
- Restrict all widgets .
- Returns True if objects are sortable .
- Overrides _init .
django-admin-sortable Key Features
django-admin-sortable Examples and Code Snippets
Community Discussions
Trending Discussions on django-admin-sortable
QUESTION
I was using Python 3.9, Django 3.2.8, and Django-admin-sortable2 1.0.3. I was facing issue that my custom order field (I named it "sort_order") was visible in inline tabular forms but it should have been hidden as per Django-admin-sortable2 implementation. And although I was able to drag-and-drop items, but upon saving the parent object, the sort order wasn't getting saved.
My admin classes were as follows:
...ANSWER
Answered 2021-Dec-23 at 18:38I found out the hint for this problem in a little unrelated issue here: https://github.com/jrief/django-admin-sortable2/issues/106
I had specified a "formset" in my TabularInline admin class. So, I just tried inheriting my inline formset class with "CustomInlineFormSet" class of django-admin-sortable2. Which solved the problem for me.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install django-admin-sortable
$ pip install django-admin-sortable
Unzip the directory and cd into the uncompressed project directory
Optional: Enable your virtualenv
Run $ python setup.py install or add adminsortable to your PYTHONPATH.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page