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
0
votes
1 answer

How to use the django-autocomplete-light to return the foreign-key with a valid value in the form?

I am newbie to django.I have written a post form for my project and want to use autocomplete to select the foreign key with Node field in the Line post form. I have applyed the django-autocomplete-light successfully to return the foreign-key…
alex chen
  • 33
  • 1
  • 5
0
votes
1 answer

Django - Autocomplete_Light's "Add Another" popup declares: "'initial' is an invalid keyword argument for this function"

I am working on getting the "add another" popup to work with django-autocomplete_light. Following along in the docs: http://django-autocomplete-light.readthedocs.org/en/latest/addanother.html I have set up my URLs: import…
0
votes
1 answer

How to create choices on the fly using autocomplete-light in django

I am able to get auto-complete working. django-version : 1.8 But i also want to create choices on the fly, and these choices should be saved in Tag model. According to my understanding, remote.js is to be used. Hence I have added the below snippet…
dreamer
  • 901
  • 2
  • 15
  • 38
0
votes
1 answer

django-autocomplete-light choices ordering

Is there any best practice to implement fields priority in django-autocomplete-light? In another words, if I have a class Cls, witch contains fields a and b and I have autocomplete for these fields, then choices, which matches by a field should go…
mingaleg
  • 2,017
  • 16
  • 28
0
votes
1 answer

How do I set the html label for autocomplete_light

Looking for a way to indicate the string label for Django's autocomplete_light form fields and for some reason I couldn't find it in the documentation.
0
votes
1 answer

Django-autocomplete-light textwidget display all the values before typing

I use django-autocomoplete-light to make an autocopmlete-field for tags. I decided to use TextWidget for my form because with ChoiceWidget I can't get the value from web-page. The problem is that when input field is activating, the values displays…
kozlone
  • 111
  • 8
0
votes
1 answer

How to restrain region choices based on country value?

I installed django-cities-light and django-autocomplete-light. All went well until I tried to prevent user from choosing Brussels as region if they entered France as country. I followed the tutorial here :…
0
votes
1 answer

django autocomplete light on admin: how does it work?

I'm trying to make searcheable customer foreigkey on model on admin. I has installed Django autocomplete light, but i can`t see works. I'm trying this. admin.py import autocomplete_light class RedAdminForm(forms.ModelForm): class Meta: …
0
votes
1 answer

autocomplete-light for adding popup outside the admin

I'm using django-crispy-forms and would like to use autocomplete-light but can't get it going. I need users to be able to create a new facility if the one they want doesn't exist. I just have no idea how to use autocomplete-light and I've been…
steph
  • 701
  • 2
  • 10
  • 30
0
votes
1 answer

autocomplete_light and django-dynamic-formset don't work together

I'm trying to use together autocomplete_light and django-dynamic-formset: both work alone but I'm not able to let them work together... let's start with the code... models.py: class Tmp_User(models.Model): userName =…
Attilio
  • 77
  • 1
  • 9
0
votes
1 answer

Django_autocomplete_light dropdown not appearing

I'm trying to implement django_autocomplete_light into one of my modelform's ModelMultipleChoiceFields. I've followed the tutorial and docs exactly but when I enter the first few letters into the field, a dropdown does not appear. models.py: class…
user700077
  • 93
  • 2
  • 9
0
votes
1 answer

Django+autocomplete_light dynamic choiceField in form

I have a strange problem. I don't know how I should even start doing it, my written english is really bad, so I can't really google it, because it seems complicated. I'm doing a simple database web application using Django 1.7.1, I want to use…
0
votes
1 answer

autocomplete_light is not showing correct suggestions with choice_for_request

I have autocomplete-light in the django modal form. I wanted to apply dynamic filtering in the suggestion box, that's why I have used choice_for_request() in the autocompletebasemodel. But because of using choice_for_request(), the suggestions are…
0
votes
1 answer

FieldError at /autocomplete/ItemsAutocomplete/

I am using autocomplete_light in a django model form. this is my model for the form class Ca_dispensaries_item(TimeStampedModel): item = models.ForeignKey(Items) dispensary = models.ForeignKey(Ca_dispensaries) description =…
0
votes
0 answers

Combine multiple django model fields into one form field

I have a form where I want to be able to let people choose a country, region or city using 1 form field (so they only have to choose 1). I am using django-autocomplete-light, so my plan is to combine all 3 model fields into 1 form field - the user…