diff --git a/dashboard/__pycache__/views.cpython-313.pyc b/dashboard/__pycache__/views.cpython-313.pyc index 0e0ca96..dc2c99a 100644 Binary files a/dashboard/__pycache__/views.cpython-313.pyc and b/dashboard/__pycache__/views.cpython-313.pyc differ diff --git a/dashboard/templates/dashboard/dashboard.html b/dashboard/templates/dashboard/dashboard.html index 088f176..add31ac 100644 --- a/dashboard/templates/dashboard/dashboard.html +++ b/dashboard/templates/dashboard/dashboard.html @@ -15,7 +15,15 @@ {% if events %}
No events found for your team.
{% endif %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/dashboard/views.py b/dashboard/views.py index 0a2015e..cb74037 100644 --- a/dashboard/views.py +++ b/dashboard/views.py @@ -22,9 +22,9 @@ def dashboard(request): all_teams = list(set(chain(player_teams, coached_teams, assisted_teams))) if all_teams: - events = Event.objects.filter(team__in=all_teams).order_by('start_time') + events = Event.objects.filter(team__in=all_teams).select_related('game', 'training').order_by('start_time') context = { 'events': events, } - return render(request, 'dashboard/dashboard.html', context) + return render(request, 'dashboard/dashboard.html', context) \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 6fefcb7..79edd80 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,6 +4,17 @@