Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example not working #1

Closed
ar-anvd opened this issue Mar 17, 2016 · 2 comments
Closed

Example not working #1

ar-anvd opened this issue Mar 17, 2016 · 2 comments

Comments

@ar-anvd
Copy link

ar-anvd commented Mar 17, 2016

I don't know exactly why, but the example doesn't work in my environment. No minify output.

However your other answer works fine.

http://stackoverflow.com/a/26139704/564979

ty

@hamidfzm
Copy link
Owner

Can you show me your environment? did you provide MINIFY_PAGE option in your flask application config?

@ar-anvd
Copy link
Author

ar-anvd commented Mar 18, 2016

@hamidfzm

https://justpaste.it/sdmt

I tried the example in two different environments (more or less the same pip packages). Just copy paste the example, and no minifty output.

debian/ubuntu server

 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [18/Mar/2016 17:36:27] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [18/Mar/2016 17:36:36] "GET / HTTP/1.1" 200 -

demo.py

from flask import Flask, render_template

app = Flask(__name__)
app.config['MINIFY_PAGE'] = True

@app.route('/')
def main():
    # index.html will be minimized !!!
    return render_template('index.html')

if __name__ == '__main__':
    app.run()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants