It was impossible to override sortable_javascript_includes_template. Fixed.
parent
dfbe590767
commit
22cd63a4ba
|
|
@ -124,7 +124,8 @@ class SortableAdmin(ModelAdmin):
|
||||||
'group_expression' : sortable_by_expression,
|
'group_expression' : sortable_by_expression,
|
||||||
'sortable_by_class' : sortable_by_class,
|
'sortable_by_class' : sortable_by_class,
|
||||||
'sortable_by_class_is_sortable' : sortable_by_class_is_sortable,
|
'sortable_by_class_is_sortable' : sortable_by_class_is_sortable,
|
||||||
'sortable_by_class_display_name' : sortable_by_class_display_name
|
'sortable_by_class_display_name' : sortable_by_class_display_name,
|
||||||
|
'sortable_javascript_includes_template': self.sortable_javascript_includes_template
|
||||||
}
|
}
|
||||||
return render(request, self.sortable_change_list_template, context)
|
return render(request, self.sortable_change_list_template, context)
|
||||||
|
|
||||||
|
|
@ -173,9 +174,8 @@ class SortableAdmin(ModelAdmin):
|
||||||
setattr(obj, 'order', start_index)
|
setattr(obj, 'order', start_index)
|
||||||
obj.save()
|
obj.save()
|
||||||
start_index += step
|
start_index += step
|
||||||
|
|
||||||
response = {'objects_sorted' : True}
|
response = {'objects_sorted' : True}
|
||||||
except (Key, IndexError, klass.DoesNotExist, AttributeError):
|
except (KeyError, IndexError, klass.DoesNotExist, AttributeError):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
response = {'objects_sorted' : False}
|
response = {'objects_sorted' : False}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% include 'adminsortable/shared/javascript_includes.html' %}
|
{% include sortable_javascript_includes_template %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue