Exemple #1
0
def edit_news(id):
	"""
	Page for editing a news article
	:param id: id of article to display and edit
	"""

	article = data.get_article(id)
	return render_template("admin/edit_article.html", article=article)
Exemple #2
0
def news(id):
	"""
	Get page for a news article
	:param id: id of article to display
	"""
	article = data.get_article(id)
	if not article:
		return "article not found", 404
	return render_template("article.html", article=article)