You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromflaskimportFlask, render_templatefromflask_htmlminimportHTMLMINapp=Flask(__name__)
app.config['MINIFY_PAGE'] =Truehtmlmin=HTMLMIN(app)
# or you can use HTMLMIN.init_app(app)# pass additional parameters to htmlmin# HTMLMIN(app, **kwargs)@app.route('/')defmain():
# index.html will be minimized !!!returnrender_template('index.html')
@app.route('/exempt')@htmlmin.exemptdefexempted_route():
# index.html will be exempted and not blessed by holy htmlmin !!!returnrender_template('index.html')
if__name__=='__main__':
app.run()
And this is my templates/index.html
<html><head><metahttp-equiv="content-type" content="text/html; charset=utf-8"></head><body><div>
Hello
</div><div>
World
</div></body></html>
I'm using python 3.7.2 and there is no minified output.
The text was updated successfully, but these errors were encountered:
I'm testing the example provided in README:
And this is my templates/index.html
I'm using python 3.7.2 and there is no minified output.
The text was updated successfully, but these errors were encountered: