diff --git a/truthinquiry/routes/routes_admin.py b/truthinquiry/routes/routes_admin.py index 7f12e71..bfaf665 100644 --- a/truthinquiry/routes/routes_admin.py +++ b/truthinquiry/routes/routes_admin.py @@ -16,7 +16,9 @@ def get_or_empty(obj, key): @routes_admin.route("/") def index(): - return flask.render_template("admin/index.html") + npcs_objs = db.session.query(Npc).all() + npcs_dicts = [{"id": npc_obj.NPC_ID, "name": npc_obj.LOCALE.TEXTS[0].TEXT} for npc_obj in npcs_objs] + return flask.render_template("admin/index.html", npcs=npcs_dicts) @routes_admin.route("/npc/") def npc(npc_id): diff --git a/truthinquiry/templates/admin/index.html b/truthinquiry/templates/admin/index.html index fd722fb..a0af4a7 100644 --- a/truthinquiry/templates/admin/index.html +++ b/truthinquiry/templates/admin/index.html @@ -5,11 +5,10 @@ Reactions

NPC list :

- Diva + {%for npc in npcs%} + {{npc['name']}}
- Barron + {%endfor%}
- Machin -
- Nouveau + Nouveau NPC