From 5589754533aab9b7edbdc41cc13c2cd189aa3c26 Mon Sep 17 00:00:00 2001 From: mjfernez Date: Fri, 25 Feb 2022 17:36:01 -0500 Subject: Remove flask caching and unused imports This removes Flask caching since it seems I'm dumb and can't implement it correctly and it seems to serve pretty much no purpose anyway. Caching can always be handled by the server in front This commit also removes some unused imports that were leftover after moving functionality to different files (like view_functions) Flask compress might be useless too since nginx can also gzip. But I can actually observe the change... is there any problem with double gzipping? --- views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'views.py') diff --git a/views.py b/views.py index 7b12e35..d69ac51 100644 --- a/views.py +++ b/views.py @@ -6,7 +6,7 @@ import os from flask import send_from_directory, abort from flask import render_template, render_template_string, make_response from siteconfig import siteconfig -from server import app, cache +from server import app from view_functions import * # bit of a hack. @@ -20,7 +20,6 @@ CONTENT_BLOCK = ( @app.route("/") @app.route("/home.html") @app.route("/index.html") -@cache.cached() def home(): """ home - renders the template `home.html` as the main index file @@ -37,7 +36,6 @@ def home(): # from: https://pythonise.com/series/learning-flask/sending-files-with-flask @app.route("/") -@cache.cached() def render_file(path): """ render_file - renders an HTML document for the given `path`. -- cgit v1.2.3