From 13d8977636f9fe41b67a06d403ce03cecd630165 Mon Sep 17 00:00:00 2001 From: Awoodwhale Date: Mon, 20 Mar 2023 20:15:58 +0800 Subject: [PATCH] fix: set specific management displays for admin --- app/templates/userpage_get.html | 7 ++----- app/user_service.py | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index fbe281d..efb55da 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -37,14 +37,11 @@

English Pal for {{ username }} -<<<<<<< HEAD + {% if username == admin_name%} 管理 + {% endif %} 退出 重设密码 -======= - 退出 - 重设密码 ->>>>>>> master

{{ flashed_messages|safe }} diff --git a/app/user_service.py b/app/user_service.py index 2d10404..215f0e5 100644 --- a/app/user_service.py +++ b/app/user_service.py @@ -1,5 +1,5 @@ from datetime import datetime - +from admin_service import ADMIN_NAME from flask import * # from app import Yaml @@ -131,6 +131,7 @@ def userpage(username): for x in lst3: words += x[0] + ' ' return render_template('userpage_get.html', + admin_name=ADMIN_NAME, username=username, session=session, flashed_messages=get_flashed_messages_if_any(),