You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Group subclass with 3 default children modules (new users per day,
per week and per month).
Advanced Usage
New BaseChart(s) abstract modules are there for you to play with. Want to track kitten activity?
BaseChart
To build charts for other time-series data, inherit from BaseChart and set a few attributes:
from admin_user_stats.base_modules import BaseChart
from kitten.models import Activity
class ActivityChart(BaseChart):
"""
Dashboard module with Activity charts.
"""
title = _('How Active were the kittens')
template = 'admin_user_stats/modules/chart.html'
chart_size = "580x100"
days = None
values_count = 10 #use either days or values_count
interval = 'days'
queryset = Activity.objects.filter(kitten=True).exclude(active=None)
date_field = 'activity_date'
aggregate = Sum('amount')
BaseCharts
To collect those charts in to the normal Day,Week,Month tabs:
from admin_user_stats.base_modules import BaseChart
class ApplicationCharts(BaseCharts):
""" Group module with 3 default registration charts """
title = _('Kitten Activity')
chart_model = ActivityChart
Contributing
Development of django-admin-user-stats happens at Bitbucket and Github: