django-tagulous
django-tagulous copied to clipboard
ValueError: Could not find manager CastTaggedUserManager in tagulous.models.tagged.
I'm trying to set tag tree models and I get the error
ValueError: Could not find manager CastTaggedUserManager in tagulous.models.tagged.
The TagTreeModel is:
class BusinessPhase(tagulous.models.TagTreeModel):
class TagMeta:
# Tag options
force_lowercase = True
And the model is:
class User(AbstractUser):
business_choices = tagulous.models.TagField(to=BusinessPhase)
Just stumbled upon the same... do you remember what was the solution?
I believe imports now need to be more specific, and the docs need updating in some places. Try from tagulous.models import TagField, TagTreeModel
- and do please let me know if that worked!
Thanks a lot! But it didn't work. What worked was extending also TaggedManager in my custom manager, from this:
class CCUserManager(UserManager):
to this:
from tagulous.models import TaggedManager
class CCUserManager(TaggedManager, UserManager):
I don't feel super good about it because I imagine that TaggedManager
was not meant to be a mixin, if anyone knows if this solution is bad for some reason I'll be very happy to hear it :sweat_smile: