Django ListView - Form to filter and sort

前端 未结 4 936
醉梦人生
醉梦人生 2020-12-12 22:58

My Goal

  • A site that list all my Updates (model) in a table
  • Dont display all models at once (pagination - maybe 10 per page)
4条回答
  •  离开以前
    2020-12-12 23:34

    I am wondering why nobody mentioned here this cool library: django-filter https://github.com/carltongibson/django-filter

    you can define your logic for filtering very clean and get fast working forms etc.

    demo here: https://stackoverflow.com/a/46492378/953553

提交回复
热议问题