@app.context_processor
def inject_static_url():
    """
    Inject the variable 'static_url' into the templates. Grab it from
    the environment variable STATIC_URL, or use the default.
    Template variable will always have a trailing slash.
    """
static_url = os.environ.get('STATIC_URL', app.static_url_path)
if not static_url.endswith('/'):
    static_url += '/'
return dict(static_url=static_url)
Flask static_folder размещен на S3