It was impossible to override sortable_javascript_includes_template. Fixed.

master
Alexander A. Sosnovskiy 2012-09-24 12:16:20 +03:00
parent dfbe590767
commit 22cd63a4ba
2 changed files with 4 additions and 4 deletions

View File

@ -124,7 +124,8 @@ class SortableAdmin(ModelAdmin):
'group_expression' : sortable_by_expression,
'sortable_by_class' : sortable_by_class,
'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)
@ -173,9 +174,8 @@ class SortableAdmin(ModelAdmin):
setattr(obj, 'order', start_index)
obj.save()
start_index += step
response = {'objects_sorted' : True}
except (Key, IndexError, klass.DoesNotExist, AttributeError):
except (KeyError, IndexError, klass.DoesNotExist, AttributeError):
pass
else:
response = {'objects_sorted' : False}

View File

@ -8,7 +8,7 @@
{% block extrahead %}
{{ block.super }}
{% include 'adminsortable/shared/javascript_includes.html' %}
{% include sortable_javascript_includes_template %}
{% endblock %}
{% block breadcrumbs %}