Commits

Branko Vukelic committed 1e44d89

Added settings and context processor

Comments (0)

Files changed (2)

heap/context_processors.py

+from . import settings
+
+def heap(request):
+    is_super = request.user.is_authenticated() and request.user.is_superuser
+    return dict(
+        HEAP_APP_ID=settings.HEAP_APP_ID,
+        HEAP_USER_UNTRACKABLE=settings.HEAP_TRACK_SUPERUSER and is_super
+    )
+from django.conf import settings
+
+HEAP_APP_ID = getattr(settings, 'HEAP_APP_ID')
+HEAP_TRACK_SUPERUSER = getattr(settings, 'HEAP_TRACK_SUPERUSER', True)