Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Sajid Samsad
Could you kindly suggest me some autocomplete library which I can use for my Django Project? My deadline is coming fast and furiously and I have already spent too much time on this autocomplete library `Select2`. -- You received this message because you are subscribed to the Google Groups

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Jason
looks like something you should go to the select2 github issue tracker for, since this is not a django issue. In the meantime, try using the unminified version of select2, would be a more relevant stack trace for you to look through the errors without the transformed names. -- You received

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Sajid Samsad
> > I actually didn't understand your question. > > > I have posted the codes above. > > > Could you kindly take a look if it's anything with the code?your question. > > I actually didn't understand your question. I have posted the codes above. Could you kindly take a look if it's to

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Jason
As you can see at https://select2.org/data-sources/ajax#jquery-ajax-options, ajax parameters are passed to a jquery method. So do you have a

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Sajid Samsad
> > Well when I write something in the search options, I got this error: > > But I didn't write the js. It is from select2. And if the request is not hit then what

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Jason
That;s not quite what I mean See above, there's a XHR (ajax) request going to reddit and you can see the headers of the

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-25 Thread Sajid Samsad
> > To @Jason > > 1) Yeah. I used the url from the browser and it worked. Actually the whole url is localhost:8000//api.alif-marine.com/search/products?q=product_name As ?q=whatever I type is supposed to be added by javascript so when I am manually doing this from my browser, I am using the

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-25 Thread Sajid Samsad
On Monday, December 25, 2017 at 8:51:46 PM UTC+6, Sajid Samsad wrote: > > > In my Django project, I have a Search field. I used Select2 autocomplete with > it. I needed to fetch the product_list from my Product model. So I created a > rest API that returns the product in json formats. > > Here

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-25 Thread Jason
Couple questions: Do you see the request going from the browser to the server and back? Not using postman, but your browser dev tools network tab you have just a `/` at your ajax url. Shouldn't this be `//` for protocol-agnostic? -- You received this message because you are subscribed to

Re: Autocomplete in Django

2017-09-18 Thread Melvyn Sopacua
Then you need to learn Ajax. You can't do dynamic forms like this and not use Ajax. I linked django-autocomplete-light for a reason: if you follow the docs and use it, you can build things you need without knowing Ajax. However, if it doesn't work or is creating problems because of incorrect

Re: Autocomplete in Django

2017-09-17 Thread Mreno sert
Thanks for the help...but I do not know ajax. Is there anything simpler like I heard about "create-field" option. Tried it , but not getting it done correctly. On Sunday, September 17, 2017 at 3:00:14 PM UTC+5:30, Andréas Kühne wrote: > > That really depends on how you want it to work? > > I

Re: Autocomplete in Django

2017-09-17 Thread Melvyn Sopacua
In particular, you need to override the ModelChoiceField that a ModelForm creates automatically and replace it with a field that is not based on ChoiceField at all or skips it's validation method (like https://github.com/yourlabs/django-autocomplete-light/blob/master/src/dal_select2/fields.py#L34

Re: Autocomplete in Django

2017-09-17 Thread Jani Tiainen
Hi. Besides the way Andréas described, there exist autocomplete fields that can accept arbitrary input you can send to backend without having to create special add phase. Adding such functionality of course requires a custom field that can add nonexisting values to database. 17.9.2017 7.40

Re: Autocomplete in Django

2017-09-17 Thread Andréas Kühne
That really depends on how you want it to work? I would probably add an item on the dropdown that shows the current items in the database, with "Add city". If the user presses that you can have an AJAX call that adds the item to the database. Regards, Andréas 2017-09-17 6:23 GMT+02:00 Mreno

Autocomplete in Django

2017-09-16 Thread Mreno sert
I have a small app in which I have form for taking 5 inputs as City1, City2,City3,City4 and City5 as the fields. I have written a code for auto completing it but A user can not enter the new fields. Only existing values can be used. How can I make it to accept a new field if not present in the

AutoComplete With Django

2012-04-02 Thread furqanmlk
Hi there, Sorry for posting this question even it had been answered but i tried all my best to solve this issue, if use result list in Jquery code directly it works. Here is code, HTML: Type Something:

Re: JQuery Autocomplete in Django Not Working

2009-04-09 Thread Charleno Pires
il.com> wrote: > > > > Guys, > > > > I have the following code from some example i got from > > > here: > >http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete... > > , > > > > but its not working on my django application. &

Re: JQuery Autocomplete in Django Not Working

2009-04-09 Thread Karen Tracey
On Thu, Apr 9, 2009 at 7:33 AM, Tomas Zulberti <tzulbe...@gmail.com> wrote: > > On Thu, Apr 9, 2009 at 3:16 AM, Gath <pgath...@gmail.com> wrote: > > > > > > Guys, > > > > I have the following code from some example i got from > > here: >

Re: JQuery Autocomplete in Django Not Working

2009-04-09 Thread Tomas Zulberti
On Thu, Apr 9, 2009 at 3:16 AM, Gath <pgath...@gmail.com> wrote: > > > Guys, > > I have the following code from some example i got from > here: > http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields, > > but its not working on my django

JQuery Autocomplete in Django Not Working

2009-04-09 Thread Gath
Guys, I have the following code from some example i got from here: http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields, but its not working on my django application. On my templete i have this function: $(function(){ setAutoComplete("tags", "tagResult