FontAwesome Icons in Inline templates

- Fixed VERSION check to enable correct templates if VERSION > 2
master
Brandon Taylor 2020-01-14 18:53:07 -05:00
parent 257e22fb8a
commit 723ddda6c2
1 changed files with 4 additions and 4 deletions

View File

@ -358,7 +358,7 @@ class SortableInlineBase(SortableAdminBase, InlineModelAdmin):
class SortableTabularInline(TabularInline, SortableInlineBase): class SortableTabularInline(TabularInline, SortableInlineBase):
"""Custom template that enables sorting for tabular inlines""" """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' template = 'adminsortable/edit_inline/tabular-1.10.x.html'
else: else:
template = 'adminsortable/edit_inline/tabular.html' template = 'adminsortable/edit_inline/tabular.html'
@ -366,7 +366,7 @@ class SortableTabularInline(TabularInline, SortableInlineBase):
class SortableStackedInline(StackedInline, SortableInlineBase): class SortableStackedInline(StackedInline, SortableInlineBase):
"""Custom template that enables sorting for stacked inlines""" """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' template = 'adminsortable/edit_inline/stacked-1.10.x.html'
else: else:
template = 'adminsortable/edit_inline/stacked.html' template = 'adminsortable/edit_inline/stacked.html'
@ -374,7 +374,7 @@ class SortableStackedInline(StackedInline, SortableInlineBase):
class SortableGenericTabularInline(GenericTabularInline, SortableInlineBase): class SortableGenericTabularInline(GenericTabularInline, SortableInlineBase):
"""Custom template that enables sorting for tabular inlines""" """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' template = 'adminsortable/edit_inline/tabular-1.10.x.html'
else: else:
template = 'adminsortable/edit_inline/tabular.html' template = 'adminsortable/edit_inline/tabular.html'
@ -382,7 +382,7 @@ class SortableGenericTabularInline(GenericTabularInline, SortableInlineBase):
class SortableGenericStackedInline(GenericStackedInline, SortableInlineBase): class SortableGenericStackedInline(GenericStackedInline, SortableInlineBase):
"""Custom template that enables sorting for stacked inlines""" """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' template = 'adminsortable/edit_inline/stacked-1.10.x.html'
else: else:
template = 'adminsortable/edit_inline/stacked.html' template = 'adminsortable/edit_inline/stacked.html'