Wrong smart-selects tamplate rendering
See original GitHub issueHi guys
I want report this bug:
As you can see the rendered script hasn’t take chainedfk
script and initialize it, because, well, if you see the script block, can’t find any smart-selects script, inclusive any jQuery url.
This is a front-end template problem, in django-admin there is other problem that i report here, and this problem appears in django debug mode, i’d tested this in production.
I could solve this problem partially adding they in the template:
{% block extra_css %}
<!-- TODO: Delete this if Smart-Selects solve this problem -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="{% static 'smart-selects/admin/js/chainedfk.js' %}"></script>
{% endblock %}
This code solve this bug, but the problem have to solved by smart-selects.
In addition i make a PR solving partially two problems with Smart-Selects, django-admin js script folders and JQUERY_URL, updating the URL i could solve a part of report problem.
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
django-smart-selects doesn't work in templates - Stack Overflow
In the admin panel, django-smart-selects works correctlyn but in templates there is an error. Uncaught ReferenceError: chainedfk is not defined.
Read more >[Answered]-Error Django smart-select: /smart_selects/widgets.py in ...
Coding example for the question Error Django smart-select: ... I've tried to install smart_selects in my project Django, but does not work.
Read more >Templates | Documentation de Django
Django defines a standard API for loading and rendering templates regardless of the backend ... Only set it to False if you're rendering...
Read more >django-smart-selects: Versions | Openbase
Force to load select2 js first; Fixed bug with missing "renderer" parameter in widgets.py render methods; Fix renderer parameter in older django versions;...
Read more >django-smart-selects - Bountysource
Error with add new Inline form - ChainedManyToManyField $ 0. Created 1 year ago in jazzband/django-smart-selects with 1 comments. I would like to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
oh guys, I am sorry, I was busy these months. I have much time now and will try to merge your fixs. I am happy to see your contribution!
@julianx your answer is correct but you have to take into consideration the following order: script src=“https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script>
<script src="{% static 'smart-selects/admin/js/chainedfk.js' %}"></script>