Skip to content

Commit

Permalink
Revert "Additional front league:detail logic for more detailed info"
Browse files Browse the repository at this point in the history
This reverts commit 2288deb.
  • Loading branch information
mikemaddem committed May 11, 2021
1 parent 2288deb commit 5b9b96a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions leagues/views.py
Expand Up @@ -3,7 +3,6 @@
from django.shortcuts import redirect
from .models import League, LeagueDivision
from profiles.models import UserProfile
from datetime import datetime


def list_leagues(request):
Expand All @@ -23,22 +22,6 @@ def detail_league(request, pk):
matches = division.matches.all()
return render(request, 'leagues/league_division.html',
{'league': league, 'matches': matches, 'division': division})
else:
divisions = league.divisions.all()
matches = divisions.matches.all()
not_completed = matches.filter(completed=False)
now = datetime.utcnow()
future = set()
past = set()
for x in not_completed:
if x.datetime is None or x.datetime == "":
pass
elif x.datetime <= now:
future.add(x)
elif x.datetime >= now:
past.add(x)
return render(request, 'leagues/league_detail.html',
{'league': league, 'divisions': divisions, 'future': future, 'past': past})
return render(request, 'leagues/league_detail.html', {'league': league, 'teams': teams})


Expand Down

0 comments on commit 5b9b96a

Please sign in to comment.