localize web template
This commit is contained in:
parent
91b4dc9e2a
commit
392c6bc748
3 changed files with 3 additions and 43 deletions
1
run.py
1
run.py
|
@ -107,6 +107,7 @@ def stacosys_server(config_pathname):
|
|||
# inject config parameters into flask
|
||||
app.config.update(SITE_REDIRECT=conf.get(ConfigParameter.SITE_REDIRECT))
|
||||
app.config.update(SITE_URL=conf.get(ConfigParameter.SITE_URL))
|
||||
app.config.update(LANG=conf.get(ConfigParameter.LANG))
|
||||
logger.info(f"start interfaces {api} {form} {admin}")
|
||||
|
||||
# start Flask
|
||||
|
|
|
@ -13,9 +13,9 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
@app.route("/web", methods=["GET"])
|
||||
def admin_homepage():
|
||||
lang = "fr"
|
||||
comments = dao.find_not_published_comments()
|
||||
return render_template("admin_" + lang + ".html", comments=comments, baseurl=app.config.get("SITE_URL"))
|
||||
return render_template("admin_" + app.config.get("LANG") + ".html", comments=comments,
|
||||
baseurl=app.config.get("SITE_URL"))
|
||||
|
||||
|
||||
@app.route("/web", methods=["POST"])
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Stacosys</title>
|
||||
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Modération des commentaires</h1>
|
||||
<!--p>cette page permet d'accepter ou rejeter un commentaire</p-->
|
||||
</header>
|
||||
<main>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Auteur</th>
|
||||
<th>Commentaire</th>
|
||||
<th>Article</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Gégé</td>
|
||||
<td>Merci pour ce commentaire ! Malheureusement je n'ai pas utilisé Isso suffisamment longtemps pour être en capacité de vous aider avec MathJax. Suite à cet [évènement](https://blogduyax.madyanne.fr/2019/je-vous-lavais-bien-dit/) je suis revenu à [mon ancestral système de commentaires](https://blogduyax.madyanne.fr/2020/bilan-hebergement-2020/).</td>
|
||||
<td>/2019/refonte-complete-du-blog/</td>
|
||||
<td>
|
||||
<button>Accepter</button>
|
||||
<button>Rejeter</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</main>
|
||||
<footer>
|
||||
<p>Cette page a été conçue par Yax avec <a href="https://simplecss.org">Simple.css</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue