Django application that provides visitor and page view tracking and an analytics dashboard for your Django website.
Project description
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
Requirements
- Python 3.9+
- Django 4.0+
It may work with older versions of Python and Django, but it has not been tested.
Installation
pip install punkweb-insight
Add punkweb_insight
to your INSTALLED_APPS
in your Django settings module:
INSTALLED_APPS = [
...
"punkweb_insight",
]
Add the following middleware to your MIDDLEWARE
in your Django settings module, directly after SessionMiddleware
:
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"punkweb_insight.middleware.InsightMiddleware", # Directly after SessionMiddleware
]
Add the following URL pattern to your urls.py
:
from django.urls import path, include
urlpatterns = [
...
path("insight/", include("punkweb_insight.urls")), # or any other path you want
]
And finally, install the models:
python manage.py migrate
Configuration
These are the default settings for Punkweb Insight, which can be overridden in your Django settings module:
PUNKWEB_INSIGHT = {}
Testing
Report:
coverage run && coverage report
HTML:
coverage run && coverage html
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
Hashes for punkweb_insight-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3603a5b600bba680121a2119d54a15fd3e8ec56cd740c5bd07e742a8d74132d3 |
|
MD5 | fbcfaba8840105c2e7396fcd2c6700b3 |
|
BLAKE2b-256 | 8e13824ab8535aa6f2d71332eef4c97afe98949ba4ef24e0d607a8e9575af470 |