Keeping filters in Django Admin

前端 未结 7 978
走了就别回头了
走了就别回头了 2021-02-04 20:23

What I would like to achive is:

  • I go to admin site, apply some filters to the list of objects
  • I click and object edit, edit, edit, hit \'Save\'
7条回答
  •  隐瞒了意图╮
    2021-02-04 20:39

    Another way to do this is to embed the filter in the queryset.

    You can dynamically create a proxy model with a manager that filters the way you want, then call admin.site.register() to create a new model admin. All the links would then be relative to this view.

提交回复
热议问题