📜  count 数据库访问 django - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:28.979000             🧑  作者: Mango

代码示例1
>>> from django.conf import settings
>>> settings.DEBUG = True
>>> from django.db import connection
>>> Model.objects.count()
>>> # python 3 uses print()
>>> print(len(connection.queries))
1