add back office places view

This commit is contained in:
Thomas Rubini 2023-03-18 16:09:42 +01:00
parent 5ac435b3f3
commit 2e1e69584f
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373
2 changed files with 10 additions and 1 deletions

View File

@ -37,4 +37,6 @@ def questions():
@routes_admin.route("/places")
def places():
return flask.render_template("admin/places.html")
places_objs = db.session.query(Place).all()
places_dicts = [{"id": place_obj.PLACE_ID, "name": place_obj.LOCALE.TEXTS[0].TEXT} for place_obj in places_objs]
return flask.render_template("admin/places.html", places=places_dicts)

View File

@ -1 +1,8 @@
<a href="/admin"> go Back </a> <br>
<section>
{%for place in places%}
<input name="{{place['id']}}" value="{{place['name']}}">
{%endfor%}
</section>