Skip to content

Commit

Permalink
Remove private competitions and competition participants counters
Browse files Browse the repository at this point in the history
  • Loading branch information
Didayolo committed Jun 13, 2024
1 parent e3dbec5 commit b64b6fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/apps/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,13 @@ def get_context_data(self, *args, **kwargs):
unpublished_comps=Count('pk', filter=Q(published=False)),
)

total_competitions = data['count']
public_competitions = data['published_comps']
users = User.objects.all().count()
competition_participants = CompetitionParticipant.objects.all().count()
submissions = Submission.objects.all().count()

context['general_stats'] = [
{'label': "Total Competitions", 'count': total_competitions},
{'label': "Public Competitions", 'count': public_competitions},
{'label': "Users", 'count': users},
{'label': "Competition Participants", 'count': competition_participants},
{'label': "Submissions", 'count': submissions},
]

Expand Down
2 changes: 1 addition & 1 deletion src/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h3 class="ui icon header">
</div>

<!-- Stats section -->
<div class="ui five column grid" id="general-stats">
<div class="ui three column grid" id="general-stats">
{% for stat in general_stats %}
<div class="column">
<div class="ui statistic">
Expand Down

0 comments on commit b64b6fa

Please sign in to comment.