A simple application that helps you to display various debug information about the Django project
Project description
django-debug-informer
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.
Source Distribution
Built Distribution
File details
Details for the file django-debug-informer-0.4.0.tar.gz
.
File metadata
- Download URL: django-debug-informer-0.4.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6afd5a02570e2b561bbdfed4dc82899c8fee1f77ad9c70bcc5f64f12b307fe0 |
|
MD5 | b5feb314d34977fe9f2e27c504225174 |
|
BLAKE2b-256 | bc43bee3883d36416698860ac827c9cc47931f3e8506ede84fa24233bd017592 |
File details
Details for the file django_debug_informer-0.4.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_debug_informer-0.4.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2eddc10444b706c2bf89fe18c462e7a2d20058f322666455c93a97cfabe8723 |
|
MD5 | 8f7b4f7e1f286fda106af55cb6f5c6ed |
|
BLAKE2b-256 | 9b3e7f46e7681e418ab3fb497b1d0149ff7cae74269f12f8f17860d5b479564a |