Unable to see sort column (no pads) v2.1.9
halessi opened this issue · 3 comments
halessi commented
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:
halessi commented
jrief commented
Sorry I don't understand what you mean.