summaryrefslogtreecommitdiff
path: root/views.py
diff options
context:
space:
mode:
authormjfernez <mjf@mjfer.net>2022-02-25 17:36:01 -0500
committermjfernez <mjf@mjfer.net>2022-02-25 17:36:01 -0500
commit5589754533aab9b7edbdc41cc13c2cd189aa3c26 (patch)
tree8e8b6ace47e4233eb807d8f0eec7ea7ad3dab73f /views.py
parent43e114b82500476fa81754bf099ad25ee945201e (diff)
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?
Diffstat (limited to 'views.py')
-rw-r--r--views.py4
1 files changed, 1 insertions, 3 deletions
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("/<path:path>")
-@cache.cached()
def render_file(path):
"""
render_file - renders an HTML document for the given `path`.