Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
halessi opened this issue Aug 23, 2023 · 3 comments
Closed

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

halessi opened this issue Aug 23, 2023 · 3 comments

Comments

@halessi
Copy link

halessi commented Aug 23, 2023

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

@halessi
Copy link
Author

halessi commented Aug 23, 2023

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

image

@lsmith77
Copy link

lsmith77 commented Sep 1, 2023

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

@jrief
Copy link
Owner

jrief commented Oct 29, 2023

Sorry I don't understand what you mean.

@jrief jrief closed this as completed Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants