说我有以下型号:
$values[] = $wpdb->prepare( "(%s, $f)", $quantity, $price );
假设有两个级别:开发人员和测试人员。应编写哪些代码而不是class Project(Model):
name = CharField()
users = ManyToManyField(), through="Membership")
@property
def developers(self):
???
class Membership(Model):
user = ForeignKey(AUTH_USER_MODEL)
project = ForeignKey(Group)
level = IntegerField()
class Meta:
unique_together = ("user", "project")
,以便???
返回与项目相关的所有用户的查询集作为开发人员?