Esempio n. 1
0
def details(request, team_name, season="2007-2008"):
    team = get_object_or_404(Teams, name_en_url=team_name)
    # season = get_object_or_404(Seasons, url=season)

    return render_to_response("teams/details.html", {
        'team': team,
        'teams_news': related_news.render_team(team.id),
        'team_news_most_popular': related_news.most_popular_team(team.id),
        'league_table': league_table.render(team.current_league_id, team.id),
        'results': last_matches.render_team(team.id),
        'live_fixtures': render_live_fixtures(team_id=team.id),
        'menu': menu.render(request, 'index', 'index', {}, True)}, RequestContext(request, {}))
Esempio n. 2
0
def teams_list(request, country_name, league_name, season="2007-2008"):
    league_id = helpers.reveal_league_name(league_name)
    league = Leagues.objects.get(pk=league_id)
    teams = Teams.objects.filter(current_league_id=league_id).order_by('name_en')

    return render_to_response("teams/teams_list.html", {
        'league': league,
        'teams': teams,
        'league_table': league_table.render(league_id),
        'league_news': related_news.render_league(league_id),
        'league_news_most_popular': related_news.most_popular_league(league_id),
        'results': render_results(league_id=league_id),
        'live_fixtures': render_live_fixtures(league_id=league_id),
        'menu': menu.render(request, 'index', 'index', {}, True)}, RequestContext(request, {}))
Esempio n. 3
0
def match_live_fixtures(league_id=0, team_id=0):
    from myscore.main.modules.matches import results

    return {"render": results.render_live_fixtures(league_id, team_id)}