[Answer]-Django Cannot resolve keyword 'items' into field. Choices are: id, name

0👍

For a Tag() to get all TaggedItem() objects where a specific Tag() is a ForeignKey on the TaggedItem() objects, you would want to access it as:

tag = Tag.objects.get(pk=1)  # for example
tag.taggeditem_set() # returns all related taggeditems

Here is the related Django Docs:

https://docs.djangoproject.com/en/dev/ref/models/relations/

1👍

I encountered this problem before.

It was because I forgot including the ‘tagging’ app into the INSTALLED_APP tuple of ‘settings.py’ for my site besides installing the ‘tagging’ app on the machine.

Hope it helps

Leave a comment