Self-hostable website analytics on Django: a straightforward collector API, dashboards, a world map, and PDF reports.
analyticsdjangodockerhandcodedpythonself-hostedsqliteviteweb-analytics
1from . import * # noqa
2
3
4# Custom settings
5
6BASE_URL = "http://localhost:8000"
7
8
9# Core settings
10# https://docs.djangoproject.com/en/4.0/ref/settings/#core-settings
11
12SECRET_KEY = 'django-insecure-kbp9@ye$bf)$^l5-6q_4&2*ghbh29s*u)s2fy05xzj6gorvv!t'
13
14
15# Debuggging
16# https://docs.djangoproject.com/en/4.0/ref/settings/#debugging
17
18DEBUG = True
19
20
21# Security
22# https://docs.djangoproject.com/en/4.0/ref/settings/#security
23
24CSRF_TRUSTED_ORIGINS = [
25 'http://localhost:3000',
26 'http://localhost:8000',
27]
28
29
30# Media files (Images, Videos)
31# https://docs.djangoproject.com/en/4.0/ref/settings/#media-root
32
33MEDIA_URL = BASE_URL + '/media/'
34
35
36# GeoIP2
37# https://docs.djangoproject.com/en/4.0/ref/contrib/gis/geoip2/#std-setting-GEOIP_PATH
38
39GEOIP_PATH = BASE_DIR / 'db.mmdb'