예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
def article(id):
    article = read.blog_article_find(id, None)[0]
    return render_template('/tutorial/article.html', article=article, id=id)
예제 #4
0
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)