Giter Club home page Giter Club logo

Comments (4)

mLamneck avatar mLamneck commented on July 16, 2024 1

I already tried to load the required js files myself before the form.media. I don't understand why but this only worked if I did the includes twice before the form.media. With one include I got the same warnings. If I do the loadJs and loadCss calls in bootstrap.js with a path to the ajax-select static folder and put the required files there, it works without the warnings. I don't know if this is what crucialfelix ment and if this is a good solution but it seems to work. Now I include in my bodytag the following things. Without the include of the admin css file the + symbol next to the autocompletefields doesn't appear and it's simply written add. I also don't know if this is correct. According to the documentation, I think it should work without this.

<link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css'%}">
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
{{form.media}}

from django-ajax-selects.

crucialfelix avatar crucialfelix commented on July 16, 2024

It would probably be better to include the minimized libraries and serve it off the same site. The original implementation was done at a time when we all switched to using public CDNs for public libraries in the name of caching and speed.

A pull request from anybody would be very welcome.

from django-ajax-selects.

1john avatar 1john commented on July 16, 2024

I believe I am seeing the same issue. Plus (possibly due to a slower connection) the JS requests are being blocked entirely and the form fields are not displaying suggestions at all.

Console Errors

Currently getting around it by loading the needed JS in the top level template base.html so django-ajax-selects bootstrap.js doesn't have to worry about it, but a better solution would be nice!

from django-ajax-selects.

crucialfelix avatar crucialfelix commented on July 16, 2024

I've now included all the assets in a vendor folder. So this error won't happen anymore.

You still have the option to set an explicit jquery-ui theme (if you use themeroller)

So this is now solved (when I do the release)

from django-ajax-selects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.