Exemple #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, {}))
Exemple #2
0
def most_popular_team_headlines(team_id, limit=10):
    from myscore.main.modules.news import related_news

    return {"render": related_news.most_popular_team(team_id, limit)}