From 2a3bb3bdef854afbcd07056f5a02e0e13b9d9622 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Mon, 8 May 2017 17:31:11 +0000 Subject: [PATCH] Use gzip compression wherever possible --- requirements.txt | 1 + rophako/app.py | 2 ++ rophako/modules/blog/templates/blog/entry.inc.html | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1c3571c..677bb17 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ flask +flask-compress flask-sslify redis pytz diff --git a/rophako/app.py b/rophako/app.py index 1db0984..2d55fb0 100644 --- a/rophako/app.py +++ b/rophako/app.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals, absolute_import from flask import (Flask, g, request, session, render_template, send_file, abort, redirect) from flask_sslify import SSLify +from flask_compress import Compress import jinja2 import os.path import datetime @@ -16,6 +17,7 @@ import sys app = Flask(__name__, static_url_path="/.static", ) +Compress(app) # We use a custom Jinja loader to support multiple template paths for custom # and default templates. The base list of template paths to check includes diff --git a/rophako/modules/blog/templates/blog/entry.inc.html b/rophako/modules/blog/templates/blog/entry.inc.html index 8f43cef..7771810 100644 --- a/rophako/modules/blog/templates/blog/entry.inc.html +++ b/rophako/modules/blog/templates/blog/entry.inc.html @@ -41,7 +41,7 @@ {{ post["rendered_body"] | safe }} {% if post["snipped"] %}

- Read more... + Read more... {% endif %}