From 10b0bbff9b2bdb2ee49bb809bca197da040f5bce Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Mon, 21 Oct 2024 18:35:07 +0100 Subject: [PATCH] Remove dated blog URIs --- app/wagtail/routes.py | 63 ------------------------------------------- 1 file changed, 63 deletions(-) diff --git a/app/wagtail/routes.py b/app/wagtail/routes.py index c7d3b17..eeee1b3 100644 --- a/app/wagtail/routes.py +++ b/app/wagtail/routes.py @@ -14,10 +14,6 @@ from .api import page_details, page_details_by_uri, page_preview -# from pydash import objects - -# from .pages import blog_index_page, blog_page, blog_post_page - @bp.route("/preview/") def preview_page(): @@ -166,65 +162,6 @@ def index(): ) -# @bp.route("///") -# def year(path, year): -# try: -# page_data = page_details_by_uri(f"/{path}/") -# except Exception: -# return render_template("errors/page-not-found.html"), 404 -# page_type = objects.get(page_data, "meta.type") -# if page_type == "blog.BlogIndexPage": -# return blog_index_page(page_data, year) -# if page_type == "blog.BlogPage": -# return blog_page(page_data, year) -# return render_template("errors/page-not-found.html"), 404 - - -# @bp.route("////") -# def month(path, year, month): -# try: -# page_data = page_details_by_uri(f"/{path}/") -# except Exception: -# return render_template("errors/page-not-found.html"), 404 -# page_type = objects.get(page_data, "meta.type") -# if page_type == "blog.BlogIndexPage": -# return blog_index_page(page_data, year, month) -# if page_type == "blog.BlogPage": -# return blog_page(page_data, year, month) -# return render_template("errors/page-not-found.html"), 404 - - -# @bp.route("/////") -# def day(path, year, month, day): -# try: -# page_data = page_details_by_uri(f"/{path}/") -# except Exception: -# return render_template("errors/page-not-found.html"), 404 -# page_type = objects.get(page_data, "meta.type") -# if page_type == "blog.BlogIndexPage": -# return blog_index_page(page_data, year, month, day) -# if page_type == "blog.BlogPage": -# return blog_page(page_data, year, month, day) -# return render_template("errors/page-not-found.html"), 404 - - -# @bp.route("//////") -# def post(path, year, month, day, post): -# try: -# page_data = page_details_by_uri(f"/{path}/{post}/") -# except Exception: -# return render_template("errors/page-not-found.html"), 404 -# page_type = objects.get(page_data, "meta.type") -# if ( -# page_type == "blog.BlogPostPage" -# and page_data["published_date"]["year"] == year -# and page_data["published_date"]["month"] == month -# and page_data["published_date"]["day"] == day -# ): -# return blog_post_page(page_data) -# return render_template("errors/page-not-found.html"), 404 - - @bp.route("//") @cache.cached(key_prefix=cache_key_prefix) def page(path):