1 {% extends
"../base.html" %}
3 {% block title %}{{ _(
"Statistics") }}{% end block %}
6 <h1>{{ _(
"Statistics") }}
</h1>
8 {% set total_accounts = len(backend.accounts) %}
11 <div class=
"col-12 col-lg-3">
12 <div class=
"card mb-3">
13 <div class=
"card-body text-center">
14 <h1>{{ total_accounts }}
</h1>
15 <h5>{{ _(
"Total Accounts") }}
</h5>
19 {% set t = now - datetime.timedelta(days=
7) %}
21 <h1>{{ backend.accounts.count_created_after(t) }}
</h1>
22 <h5 class=
"mb-0">{{ _(
"Created This Week") }}
</h5>
26 {% set t = now - datetime.timedelta(days=
30) %}
28 <h1>{{ backend.accounts.count_created_after(t) }}
</h1>
29 <h5 class=
"mb-0">{{ _(
"Created This Month") }}
</h5>
31 {% set pending_registrations = backend.accounts.pending_registrations %}
32 {% if pending_registrations %}
35 <h1>{{ pending_registrations }}
</h1>
36 <h5 class=
"mb-0">{{ _(
"Pending Registrations") }}
</h5>
42 <div class=
"col-12 col-lg-9">
44 <div class=
"card-body">
45 <h4 class=
"mb-0">{{ _(
"By Country") }}
</h4>
48 <ul class=
"list-group list-group-flush">
49 {% set countries = backend.accounts.countries %}
51 {% for country in sorted(countries, key=lambda c: countries[c], reverse=True) %}
52 <li class=
"list-group-item d-flex justify-content-between align-items-center">
54 <span class=
"flag-icon flag-icon-{{ country.alpha2.lower() }} small mr-1"></span>
55 {{ country.apolitical_name }}
58 <span class=
"badge badge-secondary" title=
"{{ countries[country] }}">
59 {{
"%.1f%%" % (countries[country] *
100 / total_accounts) }}