Log view hits over time so that you know who enter this view and when.
Project description
# View Logger
ViewLogger is a simple Django app Log view hits over time so that you know who enter this view and when.
## Installation
* Clone the package
* Add Application to your project's INSTALLED_APPs
```python
INSTALLED_APPS = (
'....',
'ViewLogger',
)
```
* Add `ViewLogger.middleware.ViewLoggerMiddleware` to your Middleware classes .
```python
MIDDLEWARE_CLASSES = (
'....',
'ViewLogger.middleware.ViewLoggerMiddleware',
)
```
* Add `django.contrib.sessions.serializers.PickleSerializer` to your SESSION_SERIALIZER in setting.py .
```python
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
```
* Run Migrations
```sh
python manage.py migrate ViewLogger
```
#### Notes
* To exempt urls add VIEWLOGGER_EXEMPTED_PATHS to your setting.py
```python
VIEWLOGGER_EXEMPTED_PATHS=("/worker",)
```
* To exempt views add VIEWLOGGER_EXEMPTED_VIEWS to your setting.py
```python
VIEWLOGGER_EXEMPTED_VIEWS=("worker",)
```
* ViewLogger by dafualt log all requests (GET and POST), add VIEWLOGGER_EXEMPTED_METHODS in your setting.py to log certain method ,
```python
VIEWLOGGER_EXEMPTED_METHODS=("POST",)
```
ViewLogger is a simple Django app Log view hits over time so that you know who enter this view and when.
## Installation
* Clone the package
* Add Application to your project's INSTALLED_APPs
```python
INSTALLED_APPS = (
'....',
'ViewLogger',
)
```
* Add `ViewLogger.middleware.ViewLoggerMiddleware` to your Middleware classes .
```python
MIDDLEWARE_CLASSES = (
'....',
'ViewLogger.middleware.ViewLoggerMiddleware',
)
```
* Add `django.contrib.sessions.serializers.PickleSerializer` to your SESSION_SERIALIZER in setting.py .
```python
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
```
* Run Migrations
```sh
python manage.py migrate ViewLogger
```
#### Notes
* To exempt urls add VIEWLOGGER_EXEMPTED_PATHS to your setting.py
```python
VIEWLOGGER_EXEMPTED_PATHS=("/worker",)
```
* To exempt views add VIEWLOGGER_EXEMPTED_VIEWS to your setting.py
```python
VIEWLOGGER_EXEMPTED_VIEWS=("worker",)
```
* ViewLogger by dafualt log all requests (GET and POST), add VIEWLOGGER_EXEMPTED_METHODS in your setting.py to log certain method ,
```python
VIEWLOGGER_EXEMPTED_METHODS=("POST",)
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ViewLogger-0.0.1.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for ViewLogger-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 403cc26ee00912853d7e4b75f039016ee13b0996261faf5b71e5dc30c8cd8457 |
|
MD5 | f83ded95dfef26df97999caa329258c6 |
|
BLAKE2b-256 | 3dded698eb1e3462f902e0aec7acc16214977097e8af7efd528d1fd10346a72f |