Questions tagged [django-autocomplete-light]

django-autocomplete-light is an open source app that provides a new approach to auto-complete implementations, specially for Django.

django-autocomplete-light is an open source app that provides a new approach to auto-complete implementations, specially for . It ships its own auto-complete script, which is different because:

  • it expects the auto-complete to be rendered on the server side, which makes any kind of customization much simpler,
  • it doesn't take any action when a choice is selected. Instead it just triggers a event, which makes it usable for any kind of purpose.

It is also called django-autocomplete-light because the Python API relies on Django widgets and no hack. This makes it portable and usable in any Django form, including in the admin.

Resources

Resource list is maintained in the README.

303 questions
2
votes
1 answer

django-autocomplete-light how to copy multi select fields

I'm using django-autocomplete-light with django 1.8. I want to be able to copy the selected contents from one autocomplete field into another which requires overriding javascript code. I tried duplicating the html content inside the autocomplete…
max
  • 9,708
  • 15
  • 89
  • 144
2
votes
1 answer

django-filter with django autocomplete light

Has anyone succesfully used dal and django-filter together? Below attempt is mine, I tried to use filterset_factory, supplying model class and fields list, then I tried to use futuremodelform. I got , ModelForm has no model class specified. I think…
durdenk
  • 1,590
  • 1
  • 14
  • 36
2
votes
1 answer

How can I fix these errors when I run manage.py

I am moving a Python Django project from one server to another server. I am using Debian 7, which has python 2.7.3 installed as standard on the target server (the original server was also using Debian 7). The project I am trying to move has the…
Gary
  • 1,086
  • 2
  • 13
  • 39
2
votes
2 answers

Django-Autocomplete-light widgets not showing up

I've just installed Django-Autocomplete-Light and followed the guide on their site. I've setup the autocomplete-view and it works as intended (returning a JASON of autocomplete options). I can't seem to get the widgets to show up, though. in and out…
Curtwagner1984
  • 1,908
  • 4
  • 30
  • 48
2
votes
2 answers

using django-autocomplete-light outside admin view

I've read http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#using-autocompletes-outside-the-admin and tried to use the widget within a simple html page but it does not work and there are no JavaScript or Python errors. Here is…
max
  • 9,708
  • 15
  • 89
  • 144
2
votes
1 answer

Autocomplete in django and allow creating user if not found

I'm trying to add a search box for users on the webpage to see his profile, and if the user doesn't exist, then I have the option to create it. In flask, I used a solution that used jquery for the autocomplete, and when no one was found, it would…
Kinwolf
  • 755
  • 2
  • 14
  • 24
2
votes
1 answer

django-autocomplete-light and angular: how can angular get the value selected

Using django-automcomplete-light V3 and angular on a non admin page. Using the widget autocomplete.ModelSelect2 Where is the selected value stored? Using firebug, it's not in a new hidden html element and if i attempt to watch the original (now…
w--
  • 6,427
  • 12
  • 54
  • 92
2
votes
0 answers

how to select multiple items from dropdown in autocomplete_light.MultipleChoiceField

I'm using autocomplete_light.MultipleChoiceField for multiple choice field. I'm able to get dropdown populated with values and for each value i need to enter the text and select values. If I need to select 10 values from the drop down i need to type…
sumajumd
  • 211
  • 1
  • 3
  • 12
2
votes
1 answer

How can i filter autocomplete queryset by form.instance attributes?

I am trying to filter M2M queryset with autocomplete-light support. I can get the filter working with the built-in ModelForm. Here is simplified version of code that works flawlessly without autocomplete: models.py: class FEmodel(models.Model): …
gsahin
  • 33
  • 6
2
votes
1 answer

OneToOne relationship and django-autocomplete-light

I have some problems with the django-autocomplete-light which I cannot resolve on my own. models.py from django.contrib.auth.models import User class UserProfile(models.Model): user = models.OneToOneField(User, related_name="user_profile") …
Zoli
  • 831
  • 1
  • 11
  • 27
2
votes
1 answer

django-autocomplete-light django 1.8 custom modelform for admin

I want add autocomplete for OneToOne field to django-admin class Banner(models.Model): product = models.OneToOneField(Product, null=True) class BannerAdmin(admin.ModelAdmin): form = BannerForm stucked on…
madzohan
  • 11,488
  • 9
  • 40
  • 67
2
votes
3 answers

Can django autocomplete_light show something than the model's string representation?

I'm using django autocomplete_light for a model search, but would like something different to the model's default string (i.e. __unicode__()) being shown in the autocompleted results. Is this possible?
askvictor
  • 3,621
  • 4
  • 32
  • 45
2
votes
0 answers

Add new record using django autocomplete light

I use autocomplete-light quite extensively in my app to do foregin key searches and all works really well. Now i got a request from my users, they would like to have the possibility to add new records when they cant find what they need in the…
2
votes
2 answers

Django autocomplete-light error "'list' object has no attribute 'startswith'"

I've installed django-autocomplete-light and am trying to get it to work. I have it on the (non admin) form, but when I try to actually change the value, I get a 500 error as above. AttributeError at /autocomplete/SeriesAutocomplete/ 'list' object…
Rob L
  • 3,634
  • 2
  • 19
  • 38
2
votes
1 answer

Django-autocomplete-light: allow free text

I am using autocomplete_light.MultipleChoiceWidget from django-autocomplete-light==1.4.13 to fill in a ManyToManyField. It only allows selecting items from existing choices. Is there a way to allow users to create new items on the fly with…
utapyngo
  • 6,946
  • 3
  • 44
  • 65