def detailsu(title): if 'user' in session and session['user'] == request.cookies.get('email'): totalcomment = Users.allcomments(title) blogs = Users.bytitle(title) return render_template('totalcomment.html', totalcomment=totalcomment,blogs=blogs) else: redirect(url_for('login'))
def details(titleblog): if titleblog == request.cookies.get('title') and 'user' in session: title = request.cookies.get('title') totalcomment = Users.allcomments(title) comment = Users.querytitlei(title)['comment'] blogs = Users.bytitle(title) number_title(comment,title) return render_template('totalcomment.html', totalcomment=totalcomment,blogs=blogs) return redirect(url_for('login'))
def commentdetails(blogtitle,email,blog_id): if blog_id.__len__() == 32: ids = Users.id_one(blog_id)['_id'] if blog_id == ids and ids != False: item = Users.bytitle_one(blogtitle) totalcomment = Users.allcomments(blogtitle) blogs = Users.bytitle(blogtitle) return render_template('totalcomment.html',totalcomment=totalcomment,blogs=blogs) else: flash(" big problem ") return redirect(url_for('login')) flash("big problem man") return redirect(url_for('login'))