From 8f9db9d58ab9c9eba61448f600eacd08c71dd95b Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sun, 19 Jan 2025 10:06:07 +0100 Subject: [PATCH] refactor: rename page templates with _.html convention --- templates/{home.html => _home.html} | 0 templates/{tag-page.html => _tag.html} | 0 threads.py | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) rename templates/{home.html => _home.html} (100%) rename templates/{tag-page.html => _tag.html} (100%) diff --git a/templates/home.html b/templates/_home.html similarity index 100% rename from templates/home.html rename to templates/_home.html diff --git a/templates/tag-page.html b/templates/_tag.html similarity index 100% rename from templates/tag-page.html rename to templates/_tag.html diff --git a/threads.py b/threads.py index ef591d1..77c97bd 100755 --- a/threads.py +++ b/threads.py @@ -65,7 +65,7 @@ async def home(): # List featured hashtags tags = masto.featured_tags() - return render_template('home.html', threads=statuses, tags=tags, app=app, attribution=attribution, render_date=datetime.now()) + return render_template('_home.html', threads=statuses, tags=tags, app=app, attribution=attribution, render_date=datetime.now()) @threads.route('/tag/') @@ -83,7 +83,7 @@ async def tag(id): - return render_template('tag-page.html', threads=statuses, tag=id, app=app, tags=tags, attribution=attribution, render_date=datetime.now()) + return render_template('_tag.html', threads=statuses, tag=id, app=app, tags=tags, attribution=attribution, render_date=datetime.now()) @threads.route('/') @@ -96,7 +96,7 @@ def thread(id): status['summary'] = utils.clean_html(status['content']).strip() if len(status['summary']) > 69: status['summary'] = status['summary'][:69] + '...' - return render_template('home.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now()) + return render_template('_home.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now()) else: return '

Not Found

🤷🤷‍♀️🤷‍♂️

go home', 404