1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +00:00

Rename files

This commit is contained in:
Steffo 2018-09-08 13:04:33 +02:00
parent 03b287f534
commit 8d470389b7
4 changed files with 4 additions and 4 deletions

View file

@ -163,7 +163,7 @@ def page_editprofile():
db_session.close() db_session.close()
if user_id is None: if user_id is None:
return redirect(url_for("page_login")) return redirect(url_for("page_login"))
return render_template("setcss.html", data=profile_data, config=config) return render_template("profileedit.html", data=profile_data, config=config)
elif request.method == "POST": elif request.method == "POST":
if user_id is None: if user_id is None:
return redirect(url_for("page_login")) return redirect(url_for("page_login"))
@ -233,7 +233,7 @@ def page_wikihome():
db_session = db.Session() db_session = db.Session()
wiki_pages = db_session.query(db.WikiEntry).order_by(db.WikiEntry.key).all() wiki_pages = db_session.query(db.WikiEntry).order_by(db.WikiEntry.key).all()
db_session.close() db_session.close()
return render_template("wikihome.html", wiki_pages=wiki_pages, config=config) return render_template("wikilist.html", wiki_pages=wiki_pages, config=config)
@app.route("/wiki/<key>", methods=["GET", "POST"]) @app.route("/wiki/<key>", methods=["GET", "POST"])
@ -245,7 +245,7 @@ def page_wiki(key: str):
.order_by(db.WikiLog.timestamp.desc()).first() .order_by(db.WikiLog.timestamp.desc()).first()
db_session.close() db_session.close()
if wiki_page is None: if wiki_page is None:
return render_template("wiki.html", key=key, config=config) return render_template("wikipage.html", key=key, config=config)
# Embed YouTube videos # Embed YouTube videos
converted_md = markdown2.markdown(wiki_page.content.replace("<", "&lt;"), converted_md = markdown2.markdown(wiki_page.content.replace("<", "&lt;"),
extras=["spoiler", "tables", "smarty-pants", "fenced-code-blocks"]) extras=["spoiler", "tables", "smarty-pants", "fenced-code-blocks"])
@ -254,7 +254,7 @@ def page_wiki(key: str):
r' <iframe src="https://www.youtube-nocookie.com/embed/\1?rel=0&amp;showinfo=0" frameborder="0"' r' <iframe src="https://www.youtube-nocookie.com/embed/\1?rel=0&amp;showinfo=0" frameborder="0"'
r' allow="autoplay; encrypted-media" allowfullscreen width="640px" height="320px"></iframe>' r' allow="autoplay; encrypted-media" allowfullscreen width="640px" height="320px"></iframe>'
r'</div>', converted_md) r'</div>', converted_md)
return render_template("wiki.html", key=key, wiki_page=wiki_page, converted_md=Markup(converted_md), return render_template("wikipage.html", key=key, wiki_page=wiki_page, converted_md=Markup(converted_md),
wiki_log=wiki_latest_edit, config=config) wiki_log=wiki_latest_edit, config=config)
elif request.method == "POST": elif request.method == "POST":
user_id = fl_session.get('user_id') user_id = fl_session.get('user_id')