title: 'flask_bootstrap.Bootstrap object' has no attribute 'load_css'
body: <p>I don't know why it can work well at my mac osx, but when I deploy it to my server with happiness :).<br>
   It shows such error:<br></p>
  
  <p><code>jinja2.exceptions.UndefinedError: 'flask_bootstrap.Bootstrap object' has no attribute 'load_css'</code><br></p>
  
  <p>Of course I should solve the error first, but more I want to know is how can I avoid such thing. Because I always git commit to test if it works on my server. It's too troublesome and not smart.<br></p>
  
  <p>PS: I use virtual environment at mac<br>
  PPS: <a href="https://github.com/Shiqiu2019/wedict/blob/master/myapp.py" rel="nofollow noreferrer">code at  github</a><br></p>
  
  <p>I didn't find the error when google.<br></p>
  
  <ol>
  <li>I expect to use load_css() function.（most important thing now)<br></li>
  <li>Find a easy way to make the environment same between my mac(where coding) and linux sever (where deploy)</li>
  </ol>
  
  <pre><code># myapp.py
  from flask_bootstrap import Bootstrap
  app = Flask(__name__)
  bootstrap = Bootstrap(app)
  ...
  </code></pre>
  
  <pre><code>{# homepage.html #}
  {% from 'bootstrap/nav.html' import render_nav_item %}
  
  {% block styles %}
  &lt;!-- Bootstrap CSS --&gt;
  {{ bootstrap.load_css() }}
  {% endblock %}
  {% block scripts %}
  &lt;!-- Optional JavaScript --&gt;
  {{ bootstrap.load_js() }}
  {% endblock %}
  ...
  </code></pre>
  
  <pre><code>ERROR:flask.app:Exception on / [GET]
  Traceback (most recent call last):
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
      response = self.full_dispatch_request()
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
      raise value
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
      rv = self.dispatch_request()
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "./myapp.py", line 28, in home
      return render_template('homepage.html',bootstrap = bootstrap)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/templating.py", line 135, in render_template
      context, ctx.app)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/flask/templating.py", line 117, in _render
      rv = template.render(context)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
      return original_render(self, *args, **kwargs)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
      return self.environment.handle_exception(exc_info, True)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
      reraise(exc_type, exc_value, tb)
    File "/srv/data/web/vhosts/default/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
      raise value.with_traceback(tb)
    File "/srv/data/web/vhosts/default/templates/homepage.html", line 5, in top-level template code
      {% block styles %}
    File "/srv/data/web/vhosts/default/templates/homepage.html", line 7, in block "styles"
      {{ bootstrap.load_css() }}
  jinja2.exceptions.UndefinedError: 'flask_bootstrap.Bootstrap object' has no attribute 'load_css'```
  
  
  </code></pre>