question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong smart-selects tamplate rendering

See original GitHub issue

Hi guys

I want report this bug: seleccion_130

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:closed
  • Created 8 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jimmykobe1171commented, Jun 2, 2016

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!

0reactions
gdriocommented, Mar 21, 2017

@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>
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found