def main_edit(): article_for_administration = Article.administration_article(user=current_user.user) if request.args.get("logout") == "True": # Logs a user out. (You do not need to pass the actual user.) # This will also clean up the remember me # bug:AttributeError: 'AnonymousUserMixin' object has no attribute 'user' # By default, when a user is not actually logged in, # current_user is set to an AnonymousUserMixin object. logout_user() return redirect(url_for("main.main_login")) return render_template('ArticleEditor.html', article_for_administration=article_for_administration)
def main_temp_1(): # render article information by user article_for_administration = Article.administration_article(user=current_user.user) return render_template("article_info_temp.html", article_for_administration=article_for_administration)