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' }))
def get_blog_articles(): articles = PlanetFeed.get_articles()[:NUM_BLOG_ARTICLES_INDEX] return articles