Repos / pytaku / a7cddf265c
commit a7cddf265c42188544e2f1048e0d46f9254b40dc
Author: Bùi Thành Nhân <hi@imnhan.com>
Date: Sat Aug 15 14:31:58 2020 +0700
move old templates to old/
Useful to keep them around for quick references I guess
diff --git a/src/pytaku/main.py b/src/pytaku/main.py
index d7a3288..ba140a5 100644
--- a/src/pytaku/main.py
+++ b/src/pytaku/main.py
@@ -55,7 +55,7 @@
def home_view():
if session.get("user"):
return redirect(url_for("follows_view"))
- return render_template("home.html")
+ return render_template("old/home.html")
@app.route("/following", methods=["GET"])
@@ -67,7 +67,7 @@ def follows_view():
if title["site"] == "mangadex":
thumbnail = url_for("proxy_view", b64_url=_encode_proxy_url(thumbnail))
title["thumbnail"] = thumbnail
- return render_template("follows.html", titles=titles)
+ return render_template("old/follows.html", titles=titles)
@app.route("/follow/<site>/<title_id>", methods=["POST"])
@@ -129,7 +129,7 @@ def auth_view():
status_code = 200
return (
render_template(
- "auth.html",
+ "old/auth.html",
register_username=username,
register_password=password,
register_confirm_password=confirm_password,
@@ -159,7 +159,7 @@ def auth_view():
return (
render_template(
- "auth.html",
+ "old/auth.html",
login_username=username,
login_password=password,
login_remember=remember,
@@ -170,7 +170,7 @@ def auth_view():
)
# Just a plain ol' GET request:
- return render_template("auth.html")
+ return render_template("old/auth.html")
@app.route("/m/<site>/<title_id>")
@@ -192,7 +192,7 @@ def title_view(site, title_id):
"proxy_view", b64_url=_encode_proxy_url(title["cover"])
)
title["source_url"] = title_source_url(site, title_id)
- return render_template("title.html", **title)
+ return render_template("old/title.html", **title)
@app.route("/m/<site>/<title_id>/<chapter_id>")
@@ -224,7 +224,7 @@ def chapter_view(site, title_id, chapter_id):
chapter["next_chapter"] = next_chapter
chapter["site"] = site
- return render_template("chapter.html", title=title, **chapter)
+ return render_template("old/chapter.html", title=title, **chapter)
@app.route("/search")
@@ -239,7 +239,7 @@ def search_view():
title["thumbnail"] = url_for(
"proxy_view", b64_url=_encode_proxy_url(title["thumbnail"])
)
- return render_template("search.html", results=results, query=query)
+ return render_template("old/search.html", results=results, query=query)
@app.route("/proxy/<b64_url>")
@@ -304,7 +304,7 @@ def import_view():
flash(f"Added {len(site_title_pairs)} follows.")
- return render_template("import.html")
+ return render_template("old/import.html")
def read_tachiyomi_follows(text: str) -> List[Tuple[str, str]]:
diff --git a/src/pytaku/templates/auth.html b/src/pytaku/templates/old/auth.html
similarity index 100%
rename from src/pytaku/templates/auth.html
rename to src/pytaku/templates/old/auth.html
diff --git a/src/pytaku/templates/chapter.html b/src/pytaku/templates/old/chapter.html
similarity index 100%
rename from src/pytaku/templates/chapter.html
rename to src/pytaku/templates/old/chapter.html
diff --git a/src/pytaku/templates/follows.html b/src/pytaku/templates/old/follows.html
similarity index 100%
rename from src/pytaku/templates/follows.html
rename to src/pytaku/templates/old/follows.html
diff --git a/src/pytaku/templates/home.html b/src/pytaku/templates/old/home.html
similarity index 100%
rename from src/pytaku/templates/home.html
rename to src/pytaku/templates/old/home.html
diff --git a/src/pytaku/templates/import.html b/src/pytaku/templates/old/import.html
similarity index 100%
rename from src/pytaku/templates/import.html
rename to src/pytaku/templates/old/import.html
diff --git a/src/pytaku/templates/search.html b/src/pytaku/templates/old/search.html
similarity index 100%
rename from src/pytaku/templates/search.html
rename to src/pytaku/templates/old/search.html
diff --git a/src/pytaku/templates/title.html b/src/pytaku/templates/old/title.html
similarity index 100%
rename from src/pytaku/templates/title.html
rename to src/pytaku/templates/old/title.html