Metadata-Version: 2.1
Name: django-request-viewer
Version: 1.0.0
Summary: Log and view requests made on your Django app
Home-page: https://github.com/sirrobot01/django-request-viewer
Author: Mukhtar Akere
Author-email: akeremukhtar10@gmail.com
License: BSD-3-Clause
Project-URL: Source, https://github.com/sirrobot01/django-request-viewer
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Description-Content-Type: text/markdown
Requires-Dist: django (>=2.2)

# Django Request Viewer


Log and view requests made on your Django App

### Introduction


<img width="1440" alt="Screenshot 2021-03-29 at 09 30 17" src="https://user-images.githubusercontent.com/32229538/112814802-8f9ef780-9077-11eb-9d4c-0d2c4a394c6b.png">


Recently, [@ichtrojan](https://github.com/ichtrojan) and [@toniastro](https://github.com/toniastro) released [horus](https://github.com/ichtrojan/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

```bash
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.
<br>
Start your server and head to http://localhost:8000/log/request-viewer
≤br>

View your request logs.<br> 

<img width="1440" alt="Screenshot 2021-03-29 at 09 30 33" src="https://user-images.githubusercontent.com/32229538/112814936-b3623d80-9077-11eb-9cdf-38f7088b6a24.png">



### 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

* Toni Akinmolayan - [twitter](https://twitter.com/toniastro_) [GitHub](https://github.com/toniastro)
* Michael Trojan Okoh - [twitter](https://twitter.com/ichtrojan) [GitHub](https://github.com/ichtrojan)



### Follow me (I am not boring, I promise)
* [Twitter](https://twitter.com/sirrobot01)
* [Github](https://github.com/sirrobot01)






