dashboard update

apikeys
Laurent 4 months ago
parent e415e1d574
commit 6ce616cdf3
  1. 4
      tournaments/admin.py
  2. 4
      tournaments/templates/admin/tournaments/dashboard.html

@ -191,7 +191,7 @@ class TournamentAdmin(SyncedObjectAdmin):
users_app = CustomUser.objects.filter(origin=2).count() # APP
# Recent User Registrations
recent_users = CustomUser.objects.all().order_by('-date_joined')[:10]
recent_app_users = CustomUser.objects.filter(origin=2).order_by('-date_joined')[:10]
# New users by period
users_today = CustomUser.objects.filter(date_joined__date=today).count()
@ -273,7 +273,7 @@ class TournamentAdmin(SyncedObjectAdmin):
'users_today': users_today,
'users_this_week': users_this_week,
'users_this_month': users_this_month,
'recent_users': recent_users,
'recent_app_users': recent_app_users,
# Purchase statistics
'total_purchases': total_purchases,

@ -222,7 +222,7 @@
<!-- Recent Users -->
<div style="background: #f8f9fa; border-radius: 8px; padding: 20px; grid-column: span 2;">
<h4 style="margin: 0 0 15px 0; display: flex; justify-content: space-between; align-items: center;">
<span>Recently Registered Users</span>
<span>Recently Registered App Users</span>
<a href="{% url 'admin:tournaments_customuser_changelist' %}" style="font-size: 14px; text-decoration: none; color: #007bff; display: flex; align-items: center;">
View All Users <span style="margin-left: 5px; font-size: 16px;"></span>
</a>
@ -238,7 +238,7 @@
</tr>
</thead>
<tbody>
{% for user in recent_users %}
{% for user in recent_app_users %}
<tr style="border-bottom: 1px solid #dee2e6;">
<td style="padding: 8px 12px;">{{ user.first_name }} {{ user.last_name }}</td>
<td style="padding: 8px 12px;">{{ user.email }}</td>

Loading…
Cancel
Save