mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Added users table
This commit is contained in:
parent
7a5a852cd7
commit
34145c8522
2 changed files with 12 additions and 1 deletions
|
@ -105,5 +105,13 @@ def groups():
|
||||||
|
|
||||||
@app.route("/users")
|
@app.route("/users")
|
||||||
def users():
|
def users():
|
||||||
|
headerAndDataList = [["Email", "row.email"],
|
||||||
|
["Is admin", "row.is_admin"],
|
||||||
|
["Assistant", "row.assistant"]]
|
||||||
|
|
||||||
|
table = makeTable(headerAndDataList=headerAndDataList,
|
||||||
|
rows=User.query.all())
|
||||||
|
|
||||||
page = "users"
|
page = "users"
|
||||||
return render_template(page + ".html", navbarItems=navbarItems(page))
|
return render_template(page + ".html", navbarItems=navbarItems(page),
|
||||||
|
table=table)
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
{{table|safe}}
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
Loading…
Reference in a new issue