miercuri, 2 august 2017

How to Get the SQL Query from Django QuerySet

http://bit.do/dbL4V DBSchema secret sale page.
How to print the SQL Query from Django QuerySet http://fosshelp.blogspot.in/2015/03/get-sql-query-from-django-queryset.html 1) Open django shell #python manage.py shell 2) Import the model class from bla.models import Building 3) Print the SQL query print Building.objects.all().query OR Building.objects.all().query.__str__()

Niciun comentariu:

Trimiteți un comentariu