def dashboard(): articles = read.blog_article_find(None, session['username']) if articles is not None: return render_template('/tutorial/dashboard.html', articles=articles) else: msg = 'You Do Not Have Any Articles' return render_template('/tutorial/dashboard.html', msg=msg)
def articles(): articles = read.blog_article_find(None, None) if articles is not None: return render_template('/tutorial/articles.html', articles=articles) else: msg = 'No Articles Found' return render_template('/tutorial/articles.html', msg=msg)
def article(id): article = read.blog_article_find(id, None)[0] return render_template('/tutorial/article.html', article=article, id=id)
def article(id): #articles = db.article.find({"_id": ObjectId(id)}) article = read.blog_article_find(id, None)[0] print(articles) return render_template('/tutorial/article.html', article=article, id=id)