[Answered ]-'ManyToManyDescriptor' object is not iterable

1๐Ÿ‘

โœ…

.watch_list is a manager, not a QuerySet, and thus not iterable, you convert this into a QuerySet with .all() [Django-doc], you should also work with request.user, not User, since User is a class, not the user:

def watchlist(request):
    watchlist_list = request.user.watchlist.all()
    context = {
        'watchlist_list': watchlist_list
    }
    # โ€ฆ

Note: It is normally better to make use of the settings.AUTH_USER_MODEL [Django-doc] to refer to the user model, than to use the User model [Django-doc] directly. For more information you can see the referencing the User model section of the documentation.

Leave a comment