1
0
mirror of https://github.com/tiyn/amphora-wiki.git synced 2026-02-22 04:44:48 +01:00

Namespaces: added feature to show folder structure

Namespaces are an important feature to have a hierarchic structure for the wiki.
A new site was added that can display and navigate the folder structure.
This commit is contained in:
TiynGER
2020-10-24 17:38:40 +02:00
parent 91d2e940b0
commit 5a9ed40251
7 changed files with 122 additions and 9 deletions

View File

@@ -43,6 +43,13 @@ def entry(fullurl):
content = cont.gen_stand_string(fullurl)
return render_template('entry.html', title=TITLE, style=STYLE, content=content), 200
@app.route('/namespace/', defaults={'fullurl': ''})
@app.route('/namespace/<path:fullurl>')
def namespace(fullurl=''):
content = cont.gen_arch_string(fullurl)
if content == None:
return render_template('error.html', title=TITLE, errorcode='404', style=STYLE), 404
return render_template('entry.html', title=TITLE, style=STYLE, content=content), 200
if __name__ == '__main__':
app.run(host='0.0.0.0')