def splash(request): """Display splash page. With featured projects and news feed.""" projects = Project.objects.filter(featured=True, inactive=False)[:4] return jingo.render(request, 'innovate/splash.html', { 'featured_projects': projects, 'blog_entries': get_blog_feed_entries(), })
def splash(request): """Display splash page. With featured projects and news feed.""" # refresh cache if requested force = request.META.get('HTTP_CACHE_CONTROL') == 'no-cache' entries = get_blog_feed_entries(force_update=force) projects = Project.objects.filter(featured=True, inactive=False)[:4] return jingo.render(request, 'innovate/splash.html', { 'featured_projects': projects, 'blog_entries': entries, })
def refresh_blog_feed(): get_blog_feed_entries(force_update=True)