Rename charts snippets and add register chart file
This commit is contained in:
parent
2a88753e17
commit
fa241b08e7
5 changed files with 46 additions and 4 deletions
|
@ -63,6 +63,16 @@ class Dashboard(View):
|
|||
}
|
||||
)
|
||||
|
||||
register_chart = Chart(
|
||||
queryset=user_queryset,
|
||||
queries = {
|
||||
"total": lambda q, s, e: q.filter(
|
||||
created_date__gt=s,
|
||||
created_date__lte=e,
|
||||
).count()
|
||||
}
|
||||
)
|
||||
|
||||
data = {
|
||||
"start": start.strftime("%Y-%m-%d"),
|
||||
"end": end.strftime("%Y-%m-%d"),
|
||||
|
@ -79,6 +89,7 @@ class Dashboard(View):
|
|||
).count(),
|
||||
"user_stats": user_chart.get_chart(start, end, interval),
|
||||
"status_stats": status_chart.get_chart(start, end, interval),
|
||||
"register_stats": register_chart.get_chart(start, end, interval),
|
||||
}
|
||||
return TemplateResponse(request, "settings/dashboard/dashboard.html", data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue