Toggler doesn’t work

Asked

Viewed 40 times

3

I am studying Django and found the following problem when using the staticsfiles, the Toggler that appears when the screen is reduced does not extend my bootstrap navbar, I did not find the error.

NOTE: the rest works, dropdown, navbar (css/js)

OBS1: when I use CDN everything works, including Toggler

presents this error: "Uncaught Typeerror: Collapse.js:346 to Primitive value."

here are the snippets I call the staticsfiles and the full project link on github

py Settings.

STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'assets')

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'staticfiles'),
)

html scripts.

{% load static %}

<script src="{% static 'jquery/dist/jquery.js' %}"></script>
<script src="{% static 'popper.js/dist/umd/popper.js'%}"></script>
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>

Project at Github

  • 1

    Take a look at the browser console (using for example Chrome Devtools) to see if all files are loaded and if there are any errors. If there are any mistakes, add to your question.

1 answer

1

I did what Thiago Krempser suggested and I discovered that the version 3.5.0 of jQuery is presenting problems, I downgraded to version 3.4.1 (the same that is used via CDN) and everything worked!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.