From 51affa31a7fba28255df94aaaca070548ae646a3 Mon Sep 17 00:00:00 2001 From: Kaspars Sprogis Date: Thu, 19 Jun 2014 19:41:29 +0300 Subject: [PATCH] Set default ordering by sortable in SortableStackedInlineBase. Related to #240 --- suit/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/suit/admin.py b/suit/admin.py index e9481f36..b34f82d3 100644 --- a/suit/admin.py +++ b/suit/admin.py @@ -73,6 +73,9 @@ class SortableStackedInlineBase(SortableModelAdminBase): """ Sortable stacked inline """ + def __init__(self, *args, **kwargs): + super(SortableStackedInlineBase, self).__init__(*args, **kwargs) + self.ordering = (self.sortable,) def get_fieldsets(self, *args, **kwargs): """