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
4 answers

Installing django-autocomplete-light examples

I am trying to install the django autocomplete light examples : django autocomplete docs with the following step (from the docs above): virtualenv autocomplete_light_env source autocomplete_light_env/bin/activate git clone…
bdelliott
  • 463
  • 1
  • 7
  • 12
2
votes
1 answer

django-autocomplete-light: How to cache choices?

I have my own City model (not django-cities-light) with more than 2M records in MySQL table. Each time I'm starting to type in autocomplete field, CPU load on htop table jumps over 200% on mysqld process, so it looks that script requests the table…
Vlad T.
  • 2,568
  • 3
  • 26
  • 40
2
votes
1 answer

Can't save a django form with this autocomplete

I'm using autocomplete-light and for some reason this specific class is not working--I can't see any major differences between it and the working autocompletes. My VirtualHost contains a fk to a Host provided that Host.contain_virtuals=True Here's…
thumbtackthief
  • 6,093
  • 10
  • 41
  • 87
2
votes
1 answer

Django-Auto-Complete Autocomplete not Registered error

when I launch the runserver command on Django, I receive an error which looks like this: autocomplete_light.exceptions.AutocompleteNotRegistered: CityAutocomplete not registered (registry is empty) What puzzles me is that CityAutocomplete is…
Aurora
  • 1,483
  • 1
  • 10
  • 9
2
votes
1 answer

Django Autocomplete Light Widget Changing Form Field Name

I have successfully set incorporated autocomplete light into my django project. I am using it on a form and it is working as expected. I followed the quick start tutorial at…
2
votes
1 answer

django-taggit custom 'tag' model and request.user

I have a requirement to track when and by whom a tag was created and so have created a custom tag model using django-taggit like so class Topics(TagBase): featured = models.BooleanField(_('Featured'), default=False) created =…
2
votes
1 answer

can't make autocomplete_light filter taggit tags based on request user

I apologize if this has nothing to do with both apps. The following snippet will throw me a "cannot filter a query once a slice has been taken": models.py class Cartao(models.Model): ... user = models.ForeignKey(settings.AUTH_USER_MODEL) …
user1182765
2
votes
3 answers

django-autocomplete-light filter queryset

I am trying to use django-autocomplete-light but I have some problems. I would like to filter the queryset in the ModelChoiceField. If I don't use auto-complete my result selection is correct but if I use widget it doesn't work correctly, it shows…
2
votes
0 answers

django autocomplete-light dependent drop down lists

I'm trying to create a non-admin form with two dependent drop down lists (continent, country) in django using autocomplete-light. The first drop down list will contain a list of continents and the second a list of countries. Once the user selects…
2
votes
0 answers

django-autocomplete-light modelform ValidationError

I have an autocomplete fields in 2 diferent forms. One is with forms.Form and works ok. Other one is with ModelForm and this doesn't work If I try with: class FacturaForm(ModelForm): class Meta: widgets =…
2
votes
1 answer

Autocomplete-light not loading select list

I'm trying to get autocomplete-light working in the admin area of my app. The docs are located here: http://django-autocomplete-light.readthedocs.org/en/docs_rewrite/debug.html The Foreign Key select list is dissapearing and a basic text box is…
Jglstewart
  • 696
  • 1
  • 8
  • 16
1
vote
3 answers

How to implement an autocomplete-datalist form field inside a CreateView in Django?

I am very new to web development and specifically using Django Framework. I am trying to find a clean, efficient and non external package dependant implementation for an autocomplete-datalist form field inside a Generic class based CreateView…
1
vote
1 answer

Why is django-autocomplete-light single-select badly styled and broken when multi-select is working?

I have a screen in Django with a single-select autocomplete and multi-select autocomplete to the same model object (but different model fields). The multi-select is working perfectly, the single-select is functional, but poorly styled and also…
dfrankow
  • 20,191
  • 41
  • 152
  • 214
1
vote
1 answer

Django Autocomplete Light not working with Bootstrap 5 Modal

I am newbie to Python and Django. I'm using DAL on a form inside a Bootstrap modal. Clicking the dropdown list appears behind the modal. The autocomplete function works correctly if I do it outside of the modal. I'm using: Django:…
1
vote
1 answer

Add a dynamic initial value in Filter

I want to add a dynamic initial value for django-filter or django-autocomplete-light to my DetailView. I don’t know how best to build it with django-filter, django-autocomplete-light or without third app. I have a dependency dropdown (in my case,…