我正在尝试这样做:
emails = [c.email for c in Client.objects.all().order_by('lastname', 'firstname')]
有没有更好的方法可以查询SELECT email from clients ORDER BY lastname, firstname
?
我正在尝试这样做:
emails = [c.email for c in Client.objects.all().order_by('lastname', 'firstname')]
有没有更好的方法可以查询SELECT email from clients ORDER BY lastname, firstname
?