python

Executing raw SQL directly in Django

In Django most of the time we use model query API. But sometimes we need to run raw SQL queries directly. Raw SQL queries To perform raw sql queries we need start with importing django.db.connection into your python file. django.db.connection object is the system's default database…