Metadata-Version: 2.1
Name: punkweb-insight
Version: 0.1.1
Summary: Django application that provides visitor and page view tracking and an analytics dashboard for your Django website.
Home-page: https://github.com/Punkweb/punkweb-insight
Author: Punkweb
Author-email: punkwebnet@gmail.com
License: BSD-3-Clause
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE

# Punkweb Insight

Punkweb Insight is a Django application that provides visitor and page view tracking and an analytics dashboard for your Django website.

## Built with

- [Django](https://www.djangoproject.com/)

## Requirements

- Python 3.9+
- Django 4.0+

It may work with older versions of Python and Django, but it has not been tested.

## Installation

```bash
pip install punkweb-insight
```

Add `insight` to your `INSTALLED_APPS` in your Django settings module:

```python
INSTALLED_APPS = [
    ...
    "insight",
]
```

Add the following middleware to your `MIDDLEWARE` in your Django settings module, directly after `SessionMiddleware`:

```python
MIDDLEWARE = [
    "django.middleware.security.SecurityMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "insight.middleware.InsightMiddleware", # Directly after SessionMiddleware
]
```

Add the following URL pattern to your `urls.py`:

```python
from django.urls import path, include

urlpatterns = [
    ...
    path("insight/", include("insight.urls")), # or any other path you want
]
```

And finally, install the models:

```bash
python manage.py migrate
```

## Configuration

These are the default settings for Punkweb Insight, which can be overridden in your Django settings module:

```python
INSIGHT = {}
```

## Testing

Report:

```bash
coverage run && coverage report
```

HTML:

```bash
coverage run && coverage html
```
