0

I am using Flask-Bootstrap package for my Flask application, however when I am creating a template as described in docs:

{% extends "bootstrap/base.html %}

<!-- Rest of the template is here -->

page source displays this:

    <!-- Bootstrap -->
    <link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

I don't know why this resource is taken from cdnjs.cloudflare.com instead of local files in Flask-Bootstrap package.

cdnjs.cloudflare.com is referred in more places in page source code.

Can I somehow change this behavior in my template, to make it serve resources from local directory?

base.html template uses bootstrap_find_resource template filter, so I guess it have something to do with CDN settings, how can I change them?

w8eight
  • 605
  • 1
  • 6
  • 21

1 Answers1

2

Add this to your configuration :

app.config['BOOTSTRAP_SERVE_LOCAL'] = True

Check out Flask-Bootstrap link for more info.