mirror of
https://github.com/RYGhub/royalnet.git
synced 2025-02-25 14:15:04 +00:00
Add Wiki list
This commit is contained in:
parent
5a3158535b
commit
65b345281d
2 changed files with 4 additions and 3 deletions
|
@ -29,8 +29,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
<h2>Wiki</h2>
|
<h2>Wiki</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for key in wiki_pages %}
|
{% for page in wiki_pages %}
|
||||||
<li><a href="wiki/{{ key }}">{{ key }}</a></li>
|
<li><a href="wiki/{{ page.key }}">{{ page.key }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -24,8 +24,9 @@ def page_main():
|
||||||
if fl_session.get("user_id"):
|
if fl_session.get("user_id"):
|
||||||
db_session = db.Session()
|
db_session = db.Session()
|
||||||
royals = db_session.query(db.Royal).all()
|
royals = db_session.query(db.Royal).all()
|
||||||
|
wiki_pages = db_session.query(db.WikiEntry).all()
|
||||||
db_session.close()
|
db_session.close()
|
||||||
return render_template("main.html", royals=royals)
|
return render_template("main.html", royals=royals, wiki_pages=wiki_pages)
|
||||||
return redirect(url_for("page_login"))
|
return redirect(url_for("page_login"))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue