Log and view requests made on your Django app
Project description
Django Request Viewer
Log and view requests made on your Django App
Introduction
Recently, @ichtrojan and @toniastro released horus, a request logger and viewer for Go. Then I felt the need for something like that for the Django community.
Installation
Install using pip
pip install django-request-viewer
Usage
Add 'request-viewer'
to your INSTALLED_APPS
in settings.py.
INSTALLED_APPS = [
...
'request-viewer',
...
]
Add 'request_viewer.middleware.RequestViewerMiddleware'
to your MIDDLEWARE list in settings.py.
MIDDLEWARE = [
...
'request_viewer.middleware.RequestViewerMiddleware',
...
]
Add 'request-viewer'
to your main urls.py
urlpatterns = [
...
path('logs/', include('request_viewer.urls'))
...
]
Run migrations, python manage.py migrate request-viewer
OPTIONAL
Add REQUEST_VIEWER
dictionary to your settings.py.
LIVE_MONITORING: Default: True
, False to pause monitoring.
WHITELISTED_PATHS: Default: []
, This is a list of paths to be excluded when monitoring
{
"LIVE_MONITORING": True,
"WHITELISTED_PATHS": ['admin/']
}
Note: Media url, Static url and request-viewer url are automatically excluded.
Start your server and head to http://localhost:8000/log/request-viewer
≤br>
View your request logs.
Contribute
Well, no big drama, fork the repo and make pull requests, easy peasy, right?
TODO
- Exceptions logger
- Creating an African unicorn
- Buying a yacht
Credits
Follow me (I am not boring, I promise)
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
Built Distribution
Hashes for django_request_viewer-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d562f30794b12136f38024f9cc9526b02d6a1130f5adfd1cfd05faf312c6b1f |
|
MD5 | 988e54398c3bf186d53e8fbca2efa3ae |
|
BLAKE2b-256 | c15cad8817f8aec71bf71837d9a3de47b4ff18d24b0480dd803e42f93a87d0ac |