Skip to content

jinja2.exceptions.UndefinedError: 'bootstrap_find_resource' is undefined #196

@nmaas87

Description

@nmaas87

I checked out the Flask Web Development section about Bootstrap ( https://github.com/miguelgrinberg/flasky/tree/3e ) and tried to run it and got this error:

File "C:\Program Files (x86)\Python37-32\lib\site-packages\flask_bootstrap\templates\bootstrap\base.html", line 15, in block "styles"
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {%- endblock metas %}
 
    {%- block styles %}
    <!-- Bootstrap -->
    <link href="{{bootstrap_find_resource('css/bootstrap.css', cdn='bootstrap')}}" rel="stylesheet">
    {%- endblock styles %}
    {%- endblock head %}
  </head>
  <body{% block body_attribs %}{% endblock body_attribs %}>
    {% block body -%}
jinja2.exceptions.UndefinedError: 'bootstrap_find_resource' is undefined

Python Version: 3.7.3, 32 bit

Pip Freeze:

altgraph==0.16.1
arrow==0.13.1
astroid==2.2.5
attrs==19.1.0
Bootstrap-Flask==1.0.10
certifi==2019.3.9
chardet==3.0.4
Click==7.0
colorama==0.4.1
dateparser==0.7.1
decorator==4.4.0
docopt==0.6.2
dominate==2.3.5
Flask==0.12.4
flask-appconfig==0.11.1
Flask-Bootstrap==3.3.7.1
Flask-Debug==0.4.3
Flask-Moment==0.7.0
flask-nav==0.6
Flask-Script==2.0.6
Flask-SQLAlchemy==2.3.2
Flask-WTF==0.14.2
future==0.17.1
hachoir==3.0a5
hachoir3==3.0a2
idna==2.8
inflection==0.3.1
ipython-genutils==0.2.0
isort==4.3.17
itsdangerous==1.1.0
Jinja2==2.10.1
json2html==1.2.1
json2table==1.1.5
jsonschema==3.0.1
jupyter-core==4.4.0
lazy-object-proxy==1.3.1
macholib==1.11
MarkupSafe==1.1.1
mccabe==0.6.1
moment==0.8.2
nbformat==4.4.0
numpy==1.16.2
pefile==2018.8.8
pipreqs==0.4.9
plotly==3.7.1
PyFladesk==1.0
PyInstaller==3.4
pylint==2.3.1
pymediainfo==4.0
PyQt5==5.12.1
PyQt5-sip==4.19.15
PyQtWebEngine==5.12.1
pyrsistent==0.14.11
python-dateutil==2.8.0
pytz==2018.9
pywin32-ctypes==0.2.0
regex==2019.4.14
repoze.lru==0.7
requests==2.21.0
retrying==1.3.3
Routes==2.4.1
six==1.12.0
SQLAlchemy==1.3.2
times==0.7
traitlets==4.3.2
typed-ast==1.3.1
tzlocal==1.5.1
urllib3==1.24.1
visitor==0.1.3
vispy==0.5.3
Werkzeug==0.15.2
wrapt==1.11.1
WTForms==2.2.1
yarg==0.1.9

Any ideas? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions