Django models - how to filter number of ForeignKey objects

后端 未结 4 1630
死守一世寂寞
死守一世寂寞 2020-12-23 19:27

I have a models A and B, that are like this:

class A(models.Model):
  title = models.CharField(max_length=20)
  (...)

class B(mode         


        
4条回答
  •  Happy的楠姐
    2020-12-23 20:18

    I assume that joining or leaving the pool may not happen as often as listing (showing) the pools. I also believe that it would be more efficient for the users join/leave actions to update the pool display status. This way, listing & showing the pools would require less time as you would just run a single query for SHOW_STATUS of the pool objects.

提交回复
热议问题