I am trying to get django-autocomplete-light to work in my app. I think I have gotten everything setup.
One thing that seems to be the problem is that when I include: {% include 'autocomplete_light/static.html' %}. I think my app isn't finding the necessary .js files listed below. When I go to the directory, I don't see the files. I thought the github download should include these files. Where should I be downloading these js files? or may be directory strucuture is incorrect?
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/autocomplete.js HTTP/1.1" 404 1715
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/django_admin.js HTTP/1.1" 404 1715
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/text_widget.js HTTP/1.1" 404 1712
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/widget.js HTTP/1.1" 404 1697
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/style.css HTTP/1.1" 404 1697
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/addanother.js HTTP/1.1" 404 1709
[21/Nov/2015 10:59:30] "GET /static/autocomplete_light/remote.js HTTP/1.1" 404 1697
Html:
{% load staticfiles %}
<script type="text/javascript" src="{% static 'jquery.js' %}">
$(document).ready(function() {
$('#add_user_accounts').InstitutionAutocomplete({
url: '{% url 'add_user_accounts' %}',
choiceSelector: 'a',
}).input.bind('selectChoice', function(e, choice, autocomplete) {
document.location.href = choice.attr('href');
});
});
</script>
{% include 'autocomplete_light/static.html' %}
<input type="text" name="q" id="add_users_accounts" placeholder="Find your institution" style="width: 270px; font-size: 12px;" />
<style type="text/css">
/* cancel out django default for now, or choices are white on white */
#header a.choice:link, #header a.choice:visited {
color: black;
}
</style>
Directory structure:
app/
static/jquery.js
autocomplete_light/