From 723ddda6c2cce65c2f017921d529f6ad52bf2b8a Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Tue, 14 Jan 2020 18:53:07 -0500 Subject: [PATCH] FontAwesome Icons in Inline templates - Fixed VERSION check to enable correct templates if VERSION > 2 --- adminsortable/admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adminsortable/admin.py b/adminsortable/admin.py index 4046391..a21e2ff 100644 --- a/adminsortable/admin.py +++ b/adminsortable/admin.py @@ -358,7 +358,7 @@ class SortableInlineBase(SortableAdminBase, InlineModelAdmin): class SortableTabularInline(TabularInline, SortableInlineBase): """Custom template that enables sorting for tabular inlines""" - if VERSION >= (1, 10): + if VERSION < (2, 0): template = 'adminsortable/edit_inline/tabular-1.10.x.html' else: template = 'adminsortable/edit_inline/tabular.html' @@ -366,7 +366,7 @@ class SortableTabularInline(TabularInline, SortableInlineBase): class SortableStackedInline(StackedInline, SortableInlineBase): """Custom template that enables sorting for stacked inlines""" - if VERSION >= (1, 10): + if VERSION < (2, 0): template = 'adminsortable/edit_inline/stacked-1.10.x.html' else: template = 'adminsortable/edit_inline/stacked.html' @@ -374,7 +374,7 @@ class SortableStackedInline(StackedInline, SortableInlineBase): class SortableGenericTabularInline(GenericTabularInline, SortableInlineBase): """Custom template that enables sorting for tabular inlines""" - if VERSION >= (1, 10): + if VERSION < (2, 0): template = 'adminsortable/edit_inline/tabular-1.10.x.html' else: template = 'adminsortable/edit_inline/tabular.html' @@ -382,7 +382,7 @@ class SortableGenericTabularInline(GenericTabularInline, SortableInlineBase): class SortableGenericStackedInline(GenericStackedInline, SortableInlineBase): """Custom template that enables sorting for stacked inlines""" - if VERSION >= (1, 10): + if VERSION < (2, 0): template = 'adminsortable/edit_inline/stacked-1.10.x.html' else: template = 'adminsortable/edit_inline/stacked.html'