mbr / flask-bootstrap

Ready-to-use Twitter-bootstrap for use in Flask.
http://pypi.python.org/pypi/Flask-Bootstrap
Other
1.58k stars 724 forks source link

Modal not working #202

Open thiagoalencar opened 4 years ago

thiagoalencar commented 4 years ago

I was trying to use a Bootstrap modal in my project, but it would show in the screen. Searching for a solution I found that bootstrap import libraries need to be in the same order as in the site because of jquery dependecie. Then I verified that the bootstrap base.html respect this other and still nothing worked. So I moved the scripts tags from the bottom of the template to the head block. Now the modal works fine. `{% block doc -%} <!DOCTYPE html> <html{% block html_attribs %}{% endblock html_attribs %}> {%- block html %}

{%- block metas %} {%- endblock metas %} {%- block head %} {% block title %}{{title|default}}{% endblock title %} {%- block styles %} {%- endblock styles %} {%- endblock head %}

<body{% block body_attribs %}{% endblock body_attribs %}> {% block body -%} {% block navbar %} {%- endblock navbar %} {% block content -%} {%- endblock content %}

{% block scripts %}

{%- endblock scripts %}
{%- endblock body %}

{%- endblock html %} {% endblock doc -%} `