Browse Source

Use gzip compression wherever possible

master
Noah Petherbridge 5 years ago
parent
commit
2a3bb3bdef
  1. 1
      requirements.txt
  2. 2
      rophako/app.py
  3. 2
      rophako/modules/blog/templates/blog/entry.inc.html

1
requirements.txt

@ -1,4 +1,5 @@
flask
flask-compress
flask-sslify
redis
pytz

2
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

2
rophako/modules/blog/templates/blog/entry.inc.html

@ -41,7 +41,7 @@
{{ post["rendered_body"] | safe }}
{% if post["snipped"] %}
<p>
<a href="{{ url_for('blog.entry', fid=post['fid']) }}">Read more...</a>
<a href="{{ url_for('blog.entry', fid=post['fid']) }}#snip">Read more...</a>
{% endif %}
<p>

Loading…
Cancel
Save