摘要: result= Booking.objects.filter() #方法一 .exists() if result.exists(): print "QuerySet has Data" else: print "QuerySet is empty" #方法二 .count()==0 if result.count() == 0: print "empty" ... 阅读全文
posted @ 2017-07-20 16:43 淋哥 阅读(19158) 评论(1) 推荐(0) 编辑