# Admin Site Lesson 15 - NameError: 'TaggedItem' is not defined

**URL:** <https://forum.codewithmosh.com/t/admin-site-lesson-15-nameerror-taggeditem-is-not-defined/10340>\
**Category:** Django\
**Created:** [January 31, 2022, 10:06am UTC](https://forum.codewithmosh.com/t/admin-site-lesson-15-nameerror-taggeditem-is-not-defined/10340 "2022-01-31T10:06:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brennycode](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@brennycode](https://forum.codewithmosh.com/u/brennycode)\
**Post date:** [January 31, 2022, 10:06am UTC](https://forum.codewithmosh.com/t/admin-site-lesson-15-nameerror-taggeditem-is-not-defined/10340/1 "2022-01-31T10:06:33Z")

</div>

Hey folks, following along on lesson 15 for using generic relations. I’ve checked my code and replayed the video several times and can’t figure out what I’m missing. In the TagInline class I’m supposed to set my model to TaggedItem, but TaggedItem isn’t defined anywhere.

Anyone else have this issue? How did you solve it?

---

<div class="post-metadata">

**Author:** ![kurukuru](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/kurukuru/32/2824_2.png) [@kurukuru](https://forum.codewithmosh.com/u/kurukuru)\
**Post date:** [February 10, 2022, 6:13pm UTC](https://forum.codewithmosh.com/t/admin-site-lesson-15-nameerror-taggeditem-is-not-defined/10340/2 "2022-02-10T18:13:40Z")

</div>

TaggedItem is defined in tags/models.py. You can check if you import TaggedItem in core/admin.py

```auto
from tags.models import TaggedItem

```
