Ejemplo n.º 1
0
def index(request):
    articles = PlanetFeed.get_articles()
    for a in articles:
        a.html_short = shorten_html(a.html, HTML_SHORTEN_LENGTH)
    return render_to_response('planet/index.html', RequestContext(request, {
        'articles': articles,
        'active_tab':'blogs',
        'subtitle': 'Blogs'
    }))
Ejemplo n.º 2
0
def get_blog_articles():
    articles = PlanetFeed.get_articles()[:NUM_BLOG_ARTICLES_INDEX]
    return articles