1. a demo for using pagination
|
|
2. get objects length
|
|
1. a demo for using pagination
|
|
2. get objects length
|
|
1.高效
MyModel.objects.filter(expired=True).delete()
2.非高效
|
|
1. 在setting.py
中定义
|
|
2. 使用using
手动选择一个数据库
|
|
1. 大于等于、小于等于
|
|
2. LIKE、包含
|
|
https://stackoverflow.com/questions/1763495/adding-extra-parameters-to-a-objects-filter-via-dict
not equal
|
|
NOT IN
|
|
(Django in / not in query)[https://stackoverflow.com/questions/4523282/django-in-not-in-query]