django-admin-sortable2 icon indicating copy to clipboard operation
django-admin-sortable2 copied to clipboard

Missing the last item of the queryset after 0.7.1, Django 2.2.9

Open meesterguyman opened this issue 5 years ago • 2 comments
trafficstars

We just discovered that in versions 0.7.1 and up, using SortableInlineAdminMixin kills the last item of the inline. Specifically, it add the final item to the empty row instead of giving it its own row. And the empty row is supposed to be hidden. Have a screenshot of what we're seeing if that would help.

meesterguyman avatar Apr 06 '20 19:04 meesterguyman

Have the same issue. For reference @meesterguyman, in my case if I add the "add permission" to the inline object for the user (eg. MyModelInline, add permission "My Model Can add" in django group that user participates), the option is shown. Not a fix, but a workaround if acceptable.

renatoch avatar Aug 15 '20 03:08 renatoch

Dirty "fix" that I adopted while this isn't correctly fixed:

In class MyModelAdmin:

class MyModelAdmin(...):
    class Media:
        css = {
            'all': ('css/admin_fix_sortable_inline.css',)
        }

File admin_fix_sortable_inline.css

.has_original.empty-form {
    display: table-row !important;
}

renatoch avatar Aug 15 '20 04:08 renatoch