3

How can I add something like a dropdown list or text input with the tags as a search in django admin

Ilian Iliev
  • 3,217
  • 4
  • 26
  • 51

1 Answers1

2
   class YourModel(models.Model):
       ...
       tags = TagField()

But if you register your model, you'll have to choose a different tag_descriptor_attr.

Checkout the overview file.

Bite code
  • 578,959
  • 113
  • 301
  • 329
  • Thanks for the answer e-satis; I don't quite following the documentation, do you have an example of how to choose a different `tag_descriptor_attr`? – user1330734 Aug 25 '17 at 06:12
  • To answer myself it is simply: `tagregister(MyModel, tag_descriptor_attr='tag_list')` – user1330734 Oct 26 '17 at 22:35