摘要: >>> qs=Question.objects.extra(select={'anum': 'SELECT COUNT(*) FROM questions_answer WHERE questions_answer.question_id = questions_question.id'},).extra(order_by=['-anum'])>>> [q.anum for q in qs][3, 3, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0]>>> qs2=Quest 阅读全文
posted @ 2014-03-05 00:48 LisPythoniC 阅读(618) 评论(0) 推荐(0) 编辑