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
1
vote
2 answers

'list' object has no attribute 'queryset' error when adding a autocomplete field to a model-form

I want to add an another autocomplete field to my model.form. However, as soon as I add the autocomplete widget for the field "projektnummer" 'projektnummer': autocomplete.ModelSelect2(url='output:projekt-form-autocomplete'), I get an wired…
1
vote
2 answers

Customising the output of items using django-autocomplete-light v3

In earlier versions of django-autocomplete-light you could use a template to render each returned entry, which included the ability to insert custom HTML I can't figure out how to do that using the regular API, so I'm trying to add it in. So far I…
user764357
1
vote
1 answer

What is the replacement for modelform_factory in the newest version of Django autocomplete light?

In previous versions of autocomplete light, there was a very quick way to add new forms. form = modelform_factory(ModelName, fields='__all__') Provided the model had an autocomplete view registered, this would automatically build a new form based…
meesterguyperson
  • 1,726
  • 1
  • 20
  • 31
1
vote
1 answer

django-autocomplete-light does not work in apache

I'm using django-autocomplete-light Django==1.8 django-autocomplete-light==3.1.6 django-easy-select2==1.2.5 django-suit==0.2.13 django-tables2==1.0.4 It works fine when I run it in the django development server but it does not load when I set…
max
  • 9,708
  • 15
  • 89
  • 144
1
vote
1 answer

Replacement for autocomplete_light.modelform_factory()

I'm trying to update from 2.2.10 to the current version, but my projects uses autocomplete_light.modelform_factory() several times to generate forms for creating new models on the admin side. Like this in admin.py: class…
Mac Chaffee
  • 110
  • 2
  • 8
1
vote
1 answer

django-autocomplete-light foreign key form

I have followed the tutorial for django-autocomplete-light http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html but i have the following question. I have a model class Order(models.Model): client = models.ForeignKey(Client) …
1
vote
0 answers

how to use django-autocomplete-light for admin filter

I'm wondering whether it is possible to use django-autocomplete-light in the admin filter. If it is possible, then how? I tried class PersonForm(forms.ModelForm): class Meta: model = Person fields = ('__all__') widgets =…
max
  • 9,708
  • 15
  • 89
  • 144
1
vote
0 answers

How to use django-haystack autocomplete via django-autocomplete-light

I am trying to implement django-haystack autocomplete via django-autocomplete-light in django admin. I am using django=1.9.6, django-haystack-2.4.1, django-autocomplete-light=3.1.5. I gone through the example given in django-autocomplete-light…
1
vote
2 answers

Django - NoReverseMatch at // after login

I'm using django-allauth for user authentication. After login the user must be redirected to /hello/prehome/.'hello' is the name of my app and the view for prehome redirects the user to homepage view along with a user id. I've specified the…
1
vote
1 answer

"Select a valid choice" error only on first submission try using django-autocomplete-light

I'm getting this weird error using django-autocomplete-light: "Select a valid choice. That choice is not one of the available choices." However, if I stay on the same page and just push Submit again it submits the form no problem, and the data in…
1
vote
1 answer

Django-Autocomplete-Light v3 widget doesn't work

So I'm doing everything as the tutorial says, I have successfully registered the autocomplete view and when I go to the right url I can see the queryset displaying as it should in json format. However I cannot get the form widget to work. If my form…
jarkow
  • 113
  • 11
1
vote
1 answer

When calling jQuery's .trigger() function propagation to other handlers bound to the element stops

When using .trigger() event on element other events bound to this event are not firing. When I comment this line everything goes well. I'm using django-autocomplete-light library so I simplified this example.
delete
  • 55
  • 7
1
vote
1 answer

Admin form for django-autocomplete-light

I am trying to use the django-autocomplete-light to add some nice autocomplete features to a Django Admin form. (DAL certainly seems to be the best/most popular and seems to have a lot of great features, it is a shame the docs are so poorly…
Doddie
  • 1,393
  • 13
  • 21
1
vote
0 answers

Remove comma to django-taggit for nice autocomplete

I'm using django-taggit for use tags in some models and django-autocomplete-light for the useful autocomplete. It's possible to show autocomplete better? Like wordpress tag section.. I want to remove the commas and just press enter to insert…
1
vote
1 answer

what does the autocomplete-light return?

I have recently installed autocomplete-light in my app. Autocomplete filters through the field called 'name' in a table called institution. However, what is post through the view is the 'id' of the same object, not the name. Does anyone know why…
H C
  • 1,138
  • 4
  • 21
  • 39