{"id":23593,"library":"django-queryinspect","title":"django-queryinspect","description":"Django Query Inspector is a middleware that logs or displays SQL queries executed during a request, including duplicate queries and query counts. Current version 1.1.0, last updated in 2019. No active development, stable for Django 2.x and earlier.","status":"maintenance","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/dobarkod/django-queryinspect","tags":["django","sql","inspect","queries","debug"],"install":[{"cmd":"pip install django-queryinspect","lang":"bash","label":"default"}],"dependencies":[],"imports":[{"wrong":"from queryinspect.middleware import QueryInspectMiddleware","symbol":"QueryInspectMiddleware","correct":"from qinspect.middleware import QueryInspectMiddleware"}],"quickstart":{"code":"MIDDLEWARE = [\n    'queryinspect.middleware.QueryInspectMiddleware',\n    # ... other middleware\n]\n\n# Optional settings\nQUERYINSPECT_LOG_TRACEBACKS = False\nQUERYINSPECT_ABSOLUTE_LIMIT = 100  # in ms\nQUERYINSPECT_LOG_QUERIES = True\nQUERYINSPECT_LOG_DUPLICATE_QUERIES = True","lang":"python","description":"Add the middleware to your Django settings. Visit any page and check the console or Django server output for SQL query logs."},"warnings":[{"fix":"Set DEBUG=True in your settings or use a different tool for production profiling.","message":"The middleware only works with Django's DEBUG=True because it uses django.db.connection.queries, which is only populated when DEBUG is True.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider using django-debug-toolbar or django-silk for active development and support.","message":"This library has not been updated since 2019 and does not officially support Django 3.0+ or Python 3.8+. It may still work with modern Django but is not tested.","severity":"deprecated","affected_versions":"Django >=3.0, Python >=3.8"},{"fix":"Ensure your database backend populates connection.queries (default Django backends do).","message":"If you use a custom database backend that does not set django.db.connection.queries, the middleware will not capture any queries.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.1.0':28 '2':39 '2019':32 'activ':34 'count':25 'current':26 'debug':47 'develop':35 'display':13 'django':2,4,38,43 'django-queryinspect':1 'duplic':21 'earlier':42 'execut':16 'includ':20 'inspect':45 'inspector':6 'last':29 'log':11 'middlewar':9 'queri':5,15,22,24,46 'queryinspect':3 'request':19 'sql':14,44 'stabl':36 'updat':30 'version':27 'x':40","created_at":"2026-05-01T08:08:35.330601+00:00","updated_at":"2026-05-01T08:08:35.330601+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmptd2luqyi/venv/lib/python3.12/site-packages/qinspect/middleware.py\", line 36, in <module>\n    enabled=(settings.DEBUG and\n             ^^^^^^^^^^^^^^\n  File \"/tmp/tmptd2luqyi/venv/lib/python3.12/site-packages/dj"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/dobarkod/django-queryinspect","docs":null,"changelog":null,"pypi":"https://pypi.org/project/django-queryinspect/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database","observability"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}