django admin のリストのページネーションを ajax のページネーションに変換したいと考えています。管理機能がajaxで動作するdjangoアプリはありますか
1 に答える
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 %}
新しいカスタム テンプレートが正しく設定されていることを確認してください。詳しくはこちらをご覧ください。
于 2016-01-21T09:49:47.853 に答える