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?

1 Answer 1

2

Add this to your configuration :

app.config['BOOTSTRAP_SERVE_LOCAL'] = True 

Check out Flask-Bootstrap link for more info.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.