From ec03f8d17b61ed840bbd41b9484281dab79951f1 Mon Sep 17 00:00:00 2001 From: Brandon Taylor Date: Mon, 8 Aug 2016 21:34:41 -0400 Subject: [PATCH] Updated change_list template for Django 1.10 compatibility. --- .../templates/adminsortable/change_list.html | 46 +++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/adminsortable/templates/adminsortable/change_list.html b/adminsortable/templates/adminsortable/change_list.html index 013a9bd..dbbbff1 100644 --- a/adminsortable/templates/adminsortable/change_list.html +++ b/adminsortable/templates/adminsortable/change_list.html @@ -1,24 +1,40 @@ -{% extends 'admin/change_list.html' %} -{% load admin_list i18n adminsortable_tags %} -{% load static from staticfiles %} +{% extends "admin/base_site.html" %} +{% load i18n admin_urls static admin_list adminsortable_tags %} {% block extrastyle %} - {{ block.super }} - + {{ block.super }} + + {% if cl.formset %} + + {% endif %} + {% if cl.formset or action_form %} + + {% endif %} + {{ media.css }} + {% if not actions_on_top and not actions_on_bottom %} + + {% endif %} + {% endblock %} {% block extrahead %} - {{ block.super }} - - - - {% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %} - +{{ block.super }} +{{ media.js }} + + + +{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %} + {% endblock %} +{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %} + {% block title %}{% blocktrans with opts.verbose_name_plural|capfirst as model %}Drag and drop {{ model }} to change display order{% endblocktrans %} | {% trans 'Django site admin' %}{% endblock %} +{% if not is_popup %} {% block breadcrumbs %} {% endblock %} +{% endif %} {% block content_title %}

@@ -48,6 +65,8 @@ {% endif %} {% endblock %} +{% block coltype %}flex{% endblock %} + {% block content %}
{% block object-tools %} @@ -62,10 +81,11 @@ {% if objects %}
{% if group_expression %} - {% render_nested_sortable_objects objects group_expression %} + {% render_nested_sortable_objects objects group_expression %} {% else %} - {% render_sortable_objects objects %} + {% render_sortable_objects objects %} {% endif %} + {% csrf_token %}
{% endif %}