67👍
✅
Assuming from the error that eventList
is a many-to-many field, you need to use .all()
to get the related objects. A many-to-many field is a manager, so you can use it to construct querysets that return the actual objects.
user = request.user.get_profile()
eL = user.eventList.all()
Source:stackexchange.com