Extending Django Admin Templates - altering change list

前端 未结 3 2112
深忆病人
深忆病人 2020-12-02 15:52

A (not so) quick question about extending django admin templates.

I\'m trying to change the result list (change list in django lingo) of a specific model by adding

3条回答
  •  失恋的感觉
    2020-12-02 16:30

    If you want a complete override of the admin_list template tag, here is my post in another thread. https://stackoverflow.com/a/55597294/11335685

    I know it is not directly related to the change_list template, but the logic for it lays on the functions inside the admin_list template tag.

    A disadvantage of that approach is i didn't find a way of overriding only specific function and get use of the other ones.

    Still that was the only approach that was allowing me to not mess with the html templates and only alter the behavior of result_list function.

    Hope that helps anyone.

提交回复
热议问题