Skip to main content

A simple application that helps you to display various debug information about the Django project

Project description

django-debug-informer Build Status codecov Updates

The Django Debug Informer is a simple application that helps you to display various debug information about the Django project.

Installation

$ pip install django-debug-informer

And add debug_informer to your INSTALLED_APPS setting:

INSTALLED_APPS = [
    # ...
    'debug_informer',
]

Add DebugInformerHeadersMiddleware to your MIDDLEWARES setting:

MIDDLEWARES = [
    # ...
    'debug_informer.middleware.DebugInformerHeadersMiddleware',
]

Include the application urls into your project root urlconf:

urlpatterns = [
    # ...
    path('djdi/', include('debug_informer.urls', namespace='djdi')),
]

Enjoy!

Usage

To get Python version:

$ http :8000/djdi/versions/python/
HTTP/1.1 200 OK
Content-Length: 132
Content-Type: application/json
Date: Sun, 29 Apr 2018 16:53:05 GMT
Server: WSGIServer/0.2 CPython/3.6.5
X-DI-Backend-Host: bat-book.local
X-DI-Backend-Pid: 60817
X-DI-Backend-Start-At: 2018-04-29T16:52:56.380979+00:00
X-Frame-Options: SAMEORIGIN

{
    "name": "Python",
    "version": "3.6.5 (default, Mar 30 2018, 06:41:53) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]"
}

To get list of installed packages:

➔ http :8000/djdi/versions/packages/
HTTP/1.1 200 OK
Content-Length: 284
Content-Type: application/json
Date: Sun, 29 Apr 2018 16:54:52 GMT
Server: WSGIServer/0.2 CPython/3.6.5
X-DI-Backend-Host: bat-book.local
X-DI-Backend-Pid: 60817
X-DI-Backend-Start-At: 2018-04-29T16:52:56.380979+00:00
X-Frame-Options: SAMEORIGIN

{
    "list": [
        {
            "name": "wheel",
            "version": "0.31.0"
        },
        {
            "name": "setuptools",
            "version": "39.1.0"
        },
        {
            "name": "pytz",
            "version": "2018.4"
        },
        {
            "name": "pip",
            "version": "10.0.1"
        },
        {
            "name": "Django",
            "version": "2.0.4"
        },
        {
            "name": "django-debug-informer",
            "version": "0.3.1.dev0"
        }
    ],
    "total": 6
}

To get specified package:

$ http :8000/djdi/versions/packages/Django/
HTTP/1.1 200 OK
Content-Length: 38
Content-Type: application/json
Date: Sun, 29 Apr 2018 16:56:26 GMT
Server: WSGIServer/0.2 CPython/3.6.5
X-DI-Backend-Host: bat-book.local
X-DI-Backend-Pid: 60817
X-DI-Backend-Start-At: 2018-04-29T16:52:56.380979+00:00
X-Frame-Options: SAMEORIGIN

{
    "name": "Django",
    "version": "2.0.4"
}

Testing and linting

For testing and linting install tox:

$ pip install tox

...and run:

$ tox

License

django-debug-informer is licensed under the MIT license. See the license file for details.

Project details


Download files

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

Files for django-debug-informer, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size django_debug_informer-0.4.0-py2.py3-none-any.whl (4.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size django-debug-informer-0.4.0.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page