Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check db calls django

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #db #calls #django
ADD COMMENT
Topic
Name
4+3 =