Can't display object properties when retrieving an Item List

sorry if this is a simple mistake but I couldn't figure it out.

I am trying to display the watchlisted items of the logged in user. I am able to display a list but the item details such as title, price etc. don't show up.

class Watchlist(models.Model):
    user = models.ForeignKey(User, on_delete = models.CASCADE, name = "user")
    item = models.ForeignKey(AuctionItem, on_delete = models.CASCADE, name = "item")

    def __str__(self):
        return f"Username: {self.user} / {self.item} "

def watchlist(request,user):
    user = request.user
    item_list = Watchlist.objects.filter(user_id=user)
    return render(request, "auctions/watchlist.html",{
        "item_list" : item_list


{% extends "auctions/layout.html" %}

{% block body %}
    {% for item in item_list %}
    <div class = "frame">
        {% if item.image %}
            <img src="{{item.image}}" style= "width: 30vw;">
        {% endif %}
        <h4><a href="{% url 'listing' %}">{{item.title}}</a></h4>
        <div id="text"><strong>Price:</strong> ${{item.price}}</div>
        <div id="text"><strong>Description:</strong> {{item.description}}</div>
        <div id="text"><strong>Category:</strong> {{item.category}}</div><br>
        <div id="date">Created {{}}</div>
    {% endfor %}
{% endblock %}

urlpatterns = [
    path("", views.index, name="index"),
    path("login", views.login_view, name="login"),
    path("logout", views.logout_view, name="logout"),
    path("register", views.register, name="register"),
    path("create", views.create_listing, name="create"),
    path("listing/<int:listing_id>", views.listing, name = "listing"),
    path("<str:user>/watchlist", views.watchlist, name= "watchlist")

and here is what I'm getting as a result:

enter image description here

In view:

item_list = AuctionItem.objects.filter(watchlist__user=user)

The template stays untouched.

Or only in template in forloop it should be {{item.item.price}} because item alone is Watchlist object.

Back to Top