Django object multiple exclude()

后端 未结 5 2187
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 22:20

Is there a way to do a query and exclude a list of things, instead of calling exclude multiple times?

5条回答
  •  一向
    一向 (楼主)
    2020-12-30 22:56

    What's wrong with calling exclude multiple times? Queries are lazy, nothing happens until you try to pull data from it, so there's no downside to using .exclude() more than once.

提交回复
热议问题