Multiple TaggableManager() fields in single model
See original GitHub issueWhen trying to create a model like:
class Test(models.Model):
tag1 = TaggableManager()
tag2 = TaggableManager()
It gives the error: ValueError: You can’t have two TaggableManagers with the same through model.
How can I allow multiple taggit fields for a single model? Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (2 by maintainers)
Top Results From Across the Web
How to have two tag fields i.e. two Taggable Managers in the ...
I would try to implement it like this. from django.db import models from taggit.managers import TaggableManager from taggit.models import ...
Read more >How to have multiple tag fields with Taggit in one model?
I tried to add admin_tags = TaggableManager() but it says that two Taggable Managers can't exist. How can I fix this? Models.py.
Read more >How to have two tag fields i.e. two Taggable Managers in the ...
I would try to implement it like this. from django.db import models from taggit.managers import TaggableManager from taggit.models import TaggedItemBase, ...
Read more >Customizing taggit — django-taggit 1.3.0 documentation
Model ): # ... fields here tags = TaggableManager(through=TaggedFood). Once this is done, the API works the same as for GFK-tagged models.
Read more >django-taggit - Read the Docs
Model ):. # ... fields here tags = TaggableManager() ... One important thing to note is that you cannot include a TaggableManager in ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Laughing at myself - read the error message.
OK this topic definitely seems worthy of some FAQ-ing