2023年3月27日

django查询优化之是否存在

摘要: res = Booking.objects.filter() # 方法一:exists() if res.exists(): print('queryset has data') else: print('queryset has no data') # 方法二:count() ==0 if res 阅读全文

posted @ 2023-03-27 21:47 一先生94 阅读(45) 评论(0) 推荐(0) 编辑

django中celery的使用

摘要: 创建django项目 $ django-admin startproject proj $ cd proj $ tree . ├── manage.py └── proj ├── __init__.py ├── asgi.py ├── settings.py ├── urls.py └── wsgi 阅读全文

posted @ 2023-03-27 21:15 一先生94 阅读(115) 评论(0) 推荐(0) 编辑

导航