In Django admin, how can I hide Save and Continue and Save and Add Another buttons on a model admin?

前端 未结 3 683
甜味超标
甜味超标 2020-12-06 01:14

I have a workflow for a model in the Django admin that is very similar to the users\' workflow. First, I have a form with basic fields and then, a second form with the rest

3条回答
  •  执笔经年
    2020-12-06 01:37

    A very different approach can be to add the following in /static/admin/css/base.css

    input[name="_addanother"],input[name="_continue"],input[name="_saveasnew"]{
        display: none;
    }
    

提交回复
热议问题