+
+
+def publish_plan(request):
+ cache_key = "publish_plan"
+ plan = cache.get(cache_key)
+
+ if plan is None:
+ plan = []
+ try:
+ feed = feedparser.parse('http://localhost:8000/documents/track/editor-proofreading/')
+ except:
+ pass
+ else:
+ for i in range(len(feed['entries'])):
+ print i
+ plan.append({
+ 'title': feed['entries'][i].title,
+ 'link': feed['entries'][i].link,
+ })
+ cache.set(cache_key, plan, 1800)
+
+ return render_to_response("publish_plan.html", {'plan': plan},
+ context_instance=RequestContext(request))