jrief/django-admin-sortable2

Unable to see sort column (no pads) v2.1.9

halessi opened this issue · 3 comments

Django 4.1

Minimal replication:

Models.py:


class testLesson(models.Model):
    title = models.CharField(max_length=200)
    
    def __str__(self):
        return self.title
        

class testCell(models.Model):
    my_order = models.PositiveIntegerField(default=0, blank=False, null=False)
    lesson = models.ForeignKey(testLesson, on_delete=models.CASCADE)
    content = models.TextField()
    
    class Meta:
        ordering = ['my_order']
        
    def __str__(self):
        return self.content[:50]   

Admin.py:

from .models import testCell, testLesson
from adminsortable2.admin import SortableTabularInline, SortableAdminBase

class testCellInline(SortableTabularInline):
    model = testCell
    extra = 1

@admin.register(testLesson)
class testLessonAdmin(SortableAdminBase, admin.ModelAdmin):
    inlines = [testCellInline]

View in admin portal:

image

Note that I can un-hide the "my_order" field in the DOM? But there are still no pads.

image

seems like I am encountering the same issue on Django 4.2 #374

jrief commented

Sorry I don't understand what you mean.