摘要: 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 @ 2019-06-10 11:37 风来风往风伤(TiAmo) 阅读(506) 评论(0) 推荐(0) 编辑