{% extends 'app/base.html' %} {% load static %} {% load mathfilters %} {% block css %} {% endblock %} {% block content %}

{{product.title}}

{{product.description}}

{% if product.measure == 'units' %}{{product.quantity|floatformat}}{% else %}{{product.quantity}}{% endif %} {{product.measure}}
{{product.finished_date|date:"M d, Y H:i:s" }}
{% if not product.winner and product.type == 'dutch' or product.type != 'dutch' %}
{% endif %} {% if product.type == 'dutch' and not product.winner %}
{{product.created_date|date:"M d, Y H:i:s" }}
{{product.initial_bid }}
{{product.final_bid }}
{% endif %} {% if product.type == 'clock' %}
Current bid: {% if product.bid_set.count == 0 %}{{product.initial_bid}}{% else %}{{product.bid_set.last.price}}{% endif %}€
{% endif %} {% if finished %}
{{product.winner}} win the bid for {{product.bid_set.last.price}}€
{% elif user.is_authenticated %}
{% csrf_token %}
{% else %} {% endif %} {% if product.type == 'clock' %} {% if product.bid_set.count != 0 %}
Bidding history
{%for bid in product.bid_set.all|dictsortreversed:"created_date"|slice:":5" %}
{{bid.buyer}}
{{bid.created_date|date:"d/m/Y H:i:s"}}
{{bid.price}}€
{%endfor%} {% if product.bid_set.count > 5 %}

...

{% endif %}
{% endif %} {% endif %}
{% if product.seller.profile.image %}
{% else %}

{{ product.seller.first_name|slice:"1"|upper }}{{ product.seller.last_name|slice:"1"|upper }}

{% endif %}
{{product.seller.get_full_name}}
{% endblock %} {% block js %} {% endblock %}