This project provides a middleware which can be used in django projects to print all SQL queries, their count and execution time for processed view before returning response for a request.
- Install python 3.7 or greater on your system using pyenv
- Activate your project's virtual environment for installing this library
$ source <virtualenv-path>/bin/activate
- Install the package by running following command
$ pip install django-sql-queries
- Add in the list of middlewares of django project
MIDDLEWARE.append("django_sql_queries.middleware.SQLPrinterMiddleware")