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

Listing : {{ Listing.title}}

{% if user.username|stringformat:"s" == Listing.user|stringformat:"s" and not Listing.closed %} Close this Listing {% endif %}
{% csrf_token %} {% if user not in Listing.watchlists.all %} {% else %} {% endif %}

{{Listing.desc}}

{% if Listing.closed %}

This listing is CLOSED


This Listing is won by @{{bids.user}} for ${{bids.bid_value}}

{% else %}

${{bids.bid_value}} by @{{bids.user}}


{% if user.is_authenticated and user != Listing.user %}
{% csrf_token %} {{ bid_form.as_p }}
{% elif user.is_authenticated and user == Listing.user%}
You can't bid on your own Listing
{% else %}
Log In to bid on this Listing {% endif %} {% endif %}

Comments ...

{% if not Listing.comments.all %} No comments Yet....


{% else %} {% for comment in Listing.comments.all %} {{comment.user}} - {{comment.date_added}}
{{ comment.body }}

{% endfor %} {% endif %} {% if not Listing.closed%}
Add comment

{% csrf_token %}

{% elif not user.is_authenticated %}

Log In to comment on this listing {% else %}

The Listing is CLOSED for comments {% endif %} {% endblock %}