Keeping filters in Django Admin

前端 未结 7 990
走了就别回头了
走了就别回头了 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:57

    This feature has been added to Django as part of the 1.6 release and is enabled now by default. It is described in the release notes:

    ModelAdmin now preserves filters on the list view after creating, editing or deleting an object. It’s possible to restore the previous behavior of clearing filters by setting the preserve_filters attribute to False.

    0 讨论(0)
提交回复
热议问题