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 = models.CharField(max_length=5000, null=True)
this is the form
class CamenuForm(autocomplete_light.ModelForm):
class Meta:
model = Ca_dispensaries_item
exclude = ('dispensary',)
autocomplete_fields = ('item',)
registered as
autocomplete_light.register(Items, search_fields=('item_name'))
when i try to enter some values in the item
, as per the autocomplete feature, it starts searching but gives field error
Cannot resolve keyword u'i' into field. Choices are: arizona_dispensaries_item, ca_dispensaries_item, colorado_dispensaries_item, created, id
i dont know from where this i
is coming from. also, dispensaries_items are some of the models. while created
and id
are field names