-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
taggit-selectize in templates #16
Comments
works in the user's frontend. Didn't need to change anything! |
@andytwoods what version of django are you using and version of selectize? did you need to include any tags in html template ? |
afraid I moved to taggit. Indeed, I am pondering whether to move from taggit to ArrayField! |
@c3959 see #17 |
I am using django 1.11.5 and taggit selectize 2.4.0. this message is from the browser console: jQuery.Deferred exception: $(...).selectize is not a function TypeError: $(...).selectize is not a function I think it's because jquery is not loaded. this is without modifying anything as recommended above or importing anything in the template. jquery was also tried from the header of the document. jquery is loaded for other script and is available in the console. |
I had this exact issue yesterday. I was using the widget in a django-filter, and a js and css file were not added to the page. I manually added these and it worked:
|
thanks guys for your guide. has a solution as explained by @andytwoods. {% block css %}
{% endblock css %} but this patch solution I do not like at all. Now I have two jquery, one in the header and one in the end of the template. Tags
This script is executed when loading the page, so it asks that the libraries be loaded before in the header. would not it be better to load libraries and then load that script when using the input? or load it after jquery at the end of the document? |
That script waits for the page to load? Via $(document).ready(function() ... |
OK, I tried swapping out |
Could anyone use it outside the admin ? I have tried almost all the methods here and on #17 but couldn't do it. |
Yes, I have it working on a form (django 2.1, taggit, bootstrap 4):
|
@aventrax FYI, I released latest from master.
|
I had this problem and thanks to @andytwoods I solved it somehow I'm using taggit-selectize in form
and added this code at the bottom of the form page
and it worked! this is my model
and this is my form
FYI hope it helps |
credits to @jmpark6846 for me I only had to add the below 2 lines and it worked! <script type="text/javascript" src="/static/taggit_selectize/js/selectize.js"></script> |
hi
this library only works in admin?
because when trying to use is a template it does not generate the field in the formual as shown in the image following the documentation.
The text was updated successfully, but these errors were encountered: