2016-01-21 42 views

回答

0

不是我知道的。您需要编写自定义管理模板和视图以反映此功能。

可以的site-packages/django/contrib/admin/templates/change_list.html的内容复制到一个自定义模板,并与您的自定义页面处理交换下面的代码:

{% block result_list %} 
      {% if action_form and actions_on_top and cl.show_admin_actions %}{% admin_actions %}{% endif %} 
      {% result_list cl %} 
      {% if action_form and actions_on_bottom and cl.show_admin_actions %}{% admin_actions %}{% endif %} 
{% endblock %} 
{% block pagination %}{% pagination cl %}{% endblock %} 

确保正确地设置新的自定义模板。有关更多信息,请参阅here