Exemple #1
0
def rankings():
    return render_template("rankings.html", notes=Note.getTopRanks("likes"))
Exemple #2
0
def view():
    form = ViewForm()
    if form.validate_on_submit():
        return render_template("statistics.html", info=Note.viewNote(request.form["id"]))
    return render_template("view.html", form=form, numPosts=Note.getAllNotes(), totalNumLikes = Note.getTotal("likes"), totalNumDislikes = Note.getTotal("dislikes"), totalNumViews = Note.getTotal(), mostLiked = Note.getTopRanks("likes")[0].numLikes, mostDisliked = Note.getTopRanks("dislikes").numDislikes)