libsass-python: SassMiddleware doesn't compile on request

i have the following code, which i imported to run.py. It should compile my *.sass file to css upon reload/request of the webapp but it kinda doesnt work. It doesnt compile my sass files to css upon request. Is there something im missing here? I dont have any errors… Thanks alot!

from flask import Flask
from sassutils.wsgi import SassMiddleware
from myapp.config import Config


def create_app(config_class=Config):
    try:
        app = Flask(__name__)
        app.config.from_object(Config)

        app.wsgi_app = SassMiddleware(app.wsgi_app, {
            'myapp': ('static/sass', 'static/css', '/static/css')
        })

    except Exception as e:
        raise e
    else:
        from myapp.main.routes import main
        app.register_blueprint(main)

        return app

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

it looks like source maps are always on with no way to turn them off. This is probably by design since it’s intended as a developer tool.

The extension thing is the issue I mentioned previously: #55 (an outstanding (imo) bug)