Beispiel #1
0
def index():
    # return "Hello World in Flask WORLD!!!!!"
    application.logger.info('Route to /index via root')
    # return render_template("index.html", title="Title Passed from View to Template",
    #                        text="Sample text for the Web Application.",
    #                        user=Userobj("Debabrata", "Patnaik"), newbookmarks=newbookmarks(5))

    return render_template("index.html",
                           title="Title Passed from View to Template",
                           text="Sample text for the Web Application.",
                           user=current_user,
                           newbookmarks=Bookmark.newbookmarks(5))
Beispiel #2
0
def newbookmarks(num):
    # return sorted(bookmarks, key=lambda bm: bm['date'], reverse=True)[:num]
    return Bookmark.newbookmarks(num=num)