Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Could not find manager CastTaggedUserManager in tagulous.models.tagged. #43

Open
KhanMaytok opened this issue Feb 21, 2018 · 3 comments

Comments

@KhanMaytok
Copy link

KhanMaytok commented Feb 21, 2018

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)
@perepicornell
Copy link

Just stumbled upon the same... do you remember what was the solution?

@radiac
Copy link
Owner

radiac commented Mar 4, 2021

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!

@perepicornell
Copy link

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 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants