jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.12k stars 352 forks source link

Django Smart Select works in admin page but doesn't work in template. Shows [HTTP/1.0 404 Not Found] in browser console #226

Closed chukwumad closed 6 years ago

AmiNadimi commented 6 years ago

Issue Resolved Manually

just add these three lines to the section of your html template

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script type="text/javascript" src="{% static '/smart-selects/admin/js/chainedfk.js' %}"></script>
    <script type="text/javascript" src="{% static '/smart-selects/admin/js/bindfields.js' %}"></script>

these are the links used in django admin.

chukwumad commented 6 years ago

Thank you. I already solved the problem using the same solution you suggested. I appreciate.

surfer190 commented 6 years ago

Yes, I can confirm that this works but is it correct? The documentation does not mention it.

blag commented 6 years ago

I'm immediately closing this issue without looking at it because it doesn't contain the information I asked for in the issue template I created for this repo. You even had to delete all of that template before writing your own text! I put a lot of work into that issue template and you just ignored it! 😭

Feel free to reopen this issue once you have filled out the issue template at:

https://github.com/digi604/django-smart-selects/blob/master/.github/ISSUE_TEMPLATE.md

by copying that, pasting it into your issue form:

issue_template

and filling out all of the necessary information:

issue_template_2

Once you have done that I will take a look at this issue. Thanks!

(These pictures are just examples from a different repository but the process is the same.)