def display_wiki_article(wiki_url): try: return render_template('wiki_page.html', article=get_wiki_article(wiki_url), index=False, wiki_url=wiki_url, title=wiki_url + " - Wiki") except KeyError: abort(404) except RedditSucksException, e: cache.delete_memoized(get_wiki_article, wiki_url) return render_template('reddit_down.html', title="reddit is down - Wiki", message=e.message)
def display_index(): try: return render_template('wiki_page.html', article=get_wiki_article('index'), index=True, title="Wiki") except RedditSucksException, e: cache.delete_memoized(get_wiki_article, 'index') return render_template('reddit_down.html', title="reddit is down - Wiki", message=e.message)
def display_pages(): try: return render_template('wiki_listing.html', links=get_wiki_pages(), title="All Pages - Wiki") except RedditSucksException, e: cache.delete_memoized(get_wiki_pages) return render_template('reddit_down.html', title="reddit is down - Wiki", message=e.message)