1
hefish Aug 12, 2017
当然是用 Model 里面提供的方法来调用啊。仔细看例子。
|
3
chengxiao Aug 13, 2017
notes = Notes.objects.filter(author=a,b,c).order_by(-'pub_date')
|
4
chengxiao Aug 13, 2017
如果调用最新 10 篇用户文章 notes = Notes.objects.all().order_by(-‘ pub_date ’)[:10]
|