Change minify lib to minify_html (apparently faster)
This commit is contained in:
5
app.py
5
app.py
@@ -7,7 +7,7 @@ from decorators import validate_person, validate_topset, validate_workout
|
||||
from db import DataBase
|
||||
from utils import get_people_and_exercise_rep_maxes, convert_str_to_date, get_earliest_and_latest_workout_date, filter_workout_topsets, get_exercise_ids_from_workouts, first_and_last_visible_days_in_month
|
||||
from flask_htmx import HTMX
|
||||
from htmlmin.main import minify
|
||||
import minify_html
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_pyfile('config.py')
|
||||
@@ -23,7 +23,8 @@ def response_minify(response):
|
||||
"""
|
||||
if response.content_type == u'text/html; charset=utf-8':
|
||||
response.set_data(
|
||||
minify(response.get_data(as_text=True))
|
||||
minify_html.minify(response.get_data(
|
||||
as_text=True), minify_js=True, remove_processing_instructions=True)
|
||||
)
|
||||
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user