Comments (4)
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.
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.
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.
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.
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)
- How to customize Widger from textbox to dropdownlist HOT 3
- Problems to implement add button outside the admin HOT 3
- Autocomplete using `inlineformset_factory`
- Documentation & example code using different urls.py HOT 1
- Issue with wagtail fields after updating from 1.7 => 1.8 HOT 2
- Django-ajax-selects and Django Rest Framework HOT 1
- Not sure what Tag is. HOT 1
- bug? add new item, initialize inline item with django-nested-admin HOT 4
- AutoCompleteSelectMultiple add new stopped to work with Django 4.1 HOT 6
- In Django 4.2 admin the search-field is displayed wrong (too large and beside item-list) HOT 3
- Admin in dark mode = trash/delete/remove icon invisible HOT 6
- How add to ajax request additional GET params? HOT 2
- Update documentation for Django 4.2
- the 3.0.0 release broke 2.2.0 for older python HOT 13
- v3.0.0 AutoCompleteSelectMultiple Add New not working with Django 4.2.8 nor 5.0.0 HOT 6
- extra_attrs tag deformed in templates
- Django add new popup window not working if nested HOT 1
- `collectstatic` doesn't work properly with new version of `jquery-ui`
- Uncaught TypeError: Cannot read properties of undefined (reading 'window.django.jQuery')
- error jquery library upgrading from Django 3.2 to Django 4.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-ajax-selects.