From: Stephen Burrows Date: Tue, 28 Jun 2011 19:22:10 +0000 (-0400) Subject: Added ordering to NavigationItemInline and removed the extra form a) because it's... X-Git-Tag: philo-0.9.1^2~5^2 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/24e2fb6a7c76c9a62dd6932f63b5dcfcbc1281ee?ds=sidebyside;hp=--cc Added ordering to NavigationItemInline and removed the extra form a) because it's unnecessary, and b) to avoid grappelli issue #337. --- 24e2fb6a7c76c9a62dd6932f63b5dcfcbc1281ee diff --git a/philo/contrib/shipherd/admin.py b/philo/contrib/shipherd/admin.py index be31a43..246693e 100644 --- a/philo/contrib/shipherd/admin.py +++ b/philo/contrib/shipherd/admin.py @@ -11,8 +11,9 @@ NAVIGATION_RAW_ID_FIELDS = ('navigation', 'parent', 'target_node') class NavigationItemInline(admin.StackedInline): raw_id_fields = NAVIGATION_RAW_ID_FIELDS model = NavigationItem - extra = 1 + extra = 0 sortable_field_name = 'order' + ordering = ('order',) related_lookup_fields = {'fk': raw_id_fields} @@ -69,7 +70,7 @@ class NodeNavigationItemInline(NavigationItemInline): class NodeNavigationInline(admin.TabularInline): model = Navigation - extra = 1 + extra = 0 NodeAdmin.inlines = [NodeNavigationInline, NodeNavigationItemInline] + NodeAdmin.inlines