Skip to main content

A simplified version of django-devserver limited to SQL tracing and Ajax dump.

Project description

https://badge.fury.io/py/django-query-tracer.svg https://travis-ci.org/morlandi/django-query-tracer.svg?branch=master https://codecov.io/gh/morlandi/django-query-tracer/branch/master/graph/badge.svg

A simplified version of django-devserver limited to SQL tracing and Ajax dump.

Motivations

django-devserver is a very nice and usefull package, but the project isn’t very active, and occasional problems related to new Django versions stay unfixed for long time even when a solution is available as PR.

Being mostly interested in tracing db queries, I finally decided to package a stripped down version of the project.

Quickstart

Install django-query-tracer:

pip install django-query-tracer

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'query_tracer',
    ...
)

Add django-query-tracer’s middleware:

MIDDLEWARE_CLASSES = [
    ...
    'query_tracer.middleware.QueryTracerMiddleware',
    ...
]

Sample local setup for development

# Install query_tracer

INSTALLED_APPS.append('query_tracer')

MIDDLEWARE_CLASSES += [
    'query_tracer.middleware.QueryTracerMiddleware',
]

QUERYTRACER_MODULES = (
    'query_tracer.modules.sql.SQLRealTimeModule',
    'query_tracer.modules.sql.SQLSummaryModule',
    'query_tracer.modules.ajax.AjaxDumpModule',
)

Features

See file “query_tracer/settings.py” for available options, and refer to django-devserver doc for usage/

Credits

This project is a stripped down version of:

Tools used in rendering this package:

0.1.3

  • Prepare for Python3

  • Enhanced sql summary logging

0.1.2

  • Default settings more suitable for production

0.1.1

  • Version comparison fix required after Django 1.10 to solve “maximum recursion depth exceeded on Django 1.10 #132” issue

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_query_tracer-0.1.3-py2.py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page