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

django-autocomplete-light open popup on Create click

I'm developing a django form using django-autocomplete-light. I would like to create a new choice in the autocomplete field: this is the tutorial I'm following: link. The tutorial example is not exactly what I want: I would like to click on "Create…
0
votes
1 answer

ProgrammingError when upgrading from Django 1.8 to 1.9

I have project with multiple apps in it. One of the apps has a Contact model and a Supplier model. The Supplier has a OneToOne relation to the Contact model. Everything worked fine in Django 1.8.11. When I attempt to makemigrations or any other…
Bobort
  • 3,085
  • 32
  • 43
0
votes
0 answers

django - multi autocomplete for array field

models.py: from django.contrib.postgres.fields import ArrayField class AdDO(models.Model): ... tags_name = ArrayField(models.CharField(max_length=40, blank=True, null=True), blank=True,…
Evgeniy_Burdin
  • 627
  • 5
  • 14
0
votes
1 answer

autocomplete light list shows only 20 items

I integrated autocomplete light with my django app. In my registry i'm doing the following: class HostAutocomplete( autocomplete_light.AutocompleteModelBase ): search_fields = [ 'hostname' ] choices = Host.objects.all() In my form i…
sumajumd
  • 211
  • 1
  • 3
  • 12
0
votes
1 answer

Django autocomplete_light shows placeholder but won't display choices

I'm attempting to create a simple auto complete field in Django and using autocomplete_light as my solution. I've studied this for a week to no avail. The field in question shows the placeholder, 'type some text to search in this autocomplete', but…
NateBz
  • 3
  • 2
0
votes
1 answer

Is possible with django-autocomplete-ligth to browse relateds objects

I would like to browse related objects in addition to search . like in the raw_id_field widget in the admin. Is it possible with django-autocomplete-light? Thanks!
0
votes
1 answer

Django Autocomplete Light doesn't return result until process restart

When I add a new record in the database, it doesn't appear in the autocomplete results until I restart the python process. My registry looks like this. import autocomplete_light from .models import Article …
kayluhb
  • 648
  • 7
  • 21
0
votes
1 answer

Django Autocomplete-light with mutiple apps

I'm using Python 3.4 Django 1.7. My project includes 3 applications that have similar models for example: I have an ElectricityBill application with: Account, Meter, Invoice models. I also have a NaturalGasBill application with: Account, Meter,…
Jglstewart
  • 696
  • 1
  • 8
  • 16
0
votes
1 answer

Adding django autocomplete to tags field

I'm trying to add django-autocomplete to the tags field but it doesn't work. I've looked at how to add it and it includes making a autocomplete file. class Tag(models.Model): name = models.CharField(max_length=20, blank=True) class Meta: …
Samuel Muiruri
  • 625
  • 1
  • 5
  • 13
0
votes
0 answers

Different implementations for Autocomplete-light

I was able to implement the autocomplete-light function using a class based view format: class UserAccountsUpdate(UpdateView): context_object_name = 'variable_used_in `add_user_accounts.html`' form_class = AddUserAccountsForm …
H C
  • 1,138
  • 4
  • 21
  • 39
0
votes
1 answer

Bolding text in autocomplete-light

I was wondering if there is a way to enable bolding of matching results when a user enter search text. Meaning: if I type appl, the autocomplete possible results should have this behavior. apple applecart pineapple Thanks
H C
  • 1,138
  • 4
  • 21
  • 39
0
votes
1 answer

autocomplete-light not showing up in Django admin

I'm trying to install the autocomplete-light function in my admin menu. I have added the following in my admin.py. I have install the app in my settings. class InstitutionAdmin(admin.ModelAdmin): form =…
H C
  • 1,138
  • 4
  • 21
  • 39
0
votes
2 answers

django-autocomplete-light can't locate .js script

I am trying to get django-autocomplete-light to work in my app. I think I have gotten everything setup. One thing that seems to be the problem is that when I include: {% include 'autocomplete_light/static.html' %}. I think my app isn't finding…
H C
  • 1,138
  • 4
  • 21
  • 39
0
votes
1 answer

Force django-autocomplete=light to return 'best' matches first

I have a long list of items I am searching through with a django-autocomplete-light field, with the autocomplete defined as such: class OccupationAutocomplete(autocomplete_light.AutocompleteModelBase): model = models.Occupation …
user764357
0
votes
1 answer

Using django-autocomplete-light in grappelli in a stackedinline form

I'm trying to use django-autocomplete-light in a grappelli admin page within a StackedInline. When used on fields in the main model, autocomplete-light fields work perfectly fine. However in inlines they are non-functional. All I get is a gray X,…
user764357