django-admin-sortable2
django-admin-sortable2 copied to clipboard
Columns expand continuously with each sort
Django 1.10 Python 3.5.2
Funny little bug here. Whenever I sort these two models in the admin site, their columns slightly expand horizontally. This continues as long as I sort the items, and the columns reset at a page refresh.
Initial view:

After sorting the items 3 times:

After sorting the items 10 times:

Here's the model being sorted in the above screenshots:
class WorkLogo(models.Model):
name = models.CharField(max_length=200)
image = models.ImageField(null=False)
order = models.PositiveIntegerField(default=0, blank=False, null=False)
def __str__(self):
return self.name
class Meta(object):
ordering = ('order',)
And the code that adds the model to the admin site:
class WorkLogoAdmin(SortableAdminMixin, admin.ModelAdmin):
model = WorkLogo
admin.site.register(WorkLogo, WorkLogoAdmin)