2016-01-21 46 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