Skip to content

Commit

Permalink
Overriding change_list_template is not always required
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed Dec 28, 2014
1 parent e257df3 commit 2773881
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions adminsortable/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ def __init__(self, model, admin_site):
self.exclude = [self.default_order_field]
elif not self.exclude or self.default_order_field != self.exclude[0]:
self.exclude = [self.default_order_field] + self.exclude
if not getattr(self, 'change_list_template', None):
self.change_list_template = 'adminsortable/change_list.html'
if not self.list_display_links:
self.list_display_links = self.list_display[0]
self._add_reorder_method()
Expand Down
2 changes: 1 addition & 1 deletion adminsortable/static/adminsortable/js/list-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jQuery.extend({

// make list view sortable
jQuery(function($) {
var sortable_update_url = $('#adminsortable_update_url').attr('href');
var sortable_update_url = $('#adminsortable_update_url').attr('href') || 'adminsortable_update/';
var startorder, endorder;
var csrfvalue = $('#changelist-form').find('input[name="csrfmiddlewaretoken"]').val();

Expand Down

0 comments on commit 2773881

Please sign in to comment.