multi autocomplete for array field

24 views
Skip to first unread message

Evgeniy Burdin

unread,
Feb 29, 2016, 1:49:01 PM2/29/16
to django-selectable

Hi!

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, null=True)

class Tag(models.Model):
    ...
    name = models.CharField(max_length=40, db_index=True)

How do multi autocomplete for the field AdDO.tags_name from Tag.name?
The AdDO.tags_name needs to get the character field, for example: "watermelon red, green leaf, black stone" (Tag.name values separated by commas)

Reply all
Reply to author
Forward
0 new messages