diff --git a/auctions/templates/auctions/index.html b/auctions/templates/auctions/index.html index 92b019c..5ec72b1 100644 --- a/auctions/templates/auctions/index.html +++ b/auctions/templates/auctions/index.html @@ -1,72 +1,72 @@ -{% extends "auctions/layout.html" %} - -{% block body %} -

Active Listings

- {% if Listings %} -
- {% for listing in Listings %} - {% if not listing.closed %} -
- -
-
- Preview not found - -
-
-

{{ listing.title }}


- -

- {% for bidding in listing.bidding_listing.all %} - bid price : ${{bidding.bid_value}}
- Last bid by: {{ bidding.user }} -
- Description: {{ listing.desc }}
- {% endfor %} - - created on {{listing.date_added}} -

- - - - -
- - {% if user.is_authenticated %} - -
- {% csrf_token %} - {% if user not in listing.watchlists.all %} - - {% else %} - - {% endif %} - - -
- {% else %} - log in to watch this listing - - {% endif %} - - -
- -
-
-
-
-
- {% endif %} - {% endfor %} -
- {% else %} -
-
-
-
-

Seems to be no listings in this Auction!!

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

Active Listings

+ {% if Listings %} +
+ {% for listing in Listings %} + {% if not listing.closed %} +
+ +
+
+ Preview not found + +
+
+

{{ listing.title }}


+ +

+ {% for bidding in listing.bidding_listing.all %} + bid price : ${{bidding.bid_value}}
+ Last bid by: {{ bidding.user }} +
+ Description: {{ listing.desc }}
+ {% endfor %} + + created on {{listing.date_added}} +

+ + + + +
+ + {% if user.is_authenticated %} + +
+ {% csrf_token %} + {% if user not in listing.watchlists.all %} + + {% else %} + + {% endif %} + + +
+ {% else %} + log in to watch this listing + + {% endif %} + + +
+ +
+
+
+
+
+ {% endif %} + {% endfor %} +
+ {% else %} +
+
+
+
+

Seems to be no listings in this Auction!!

+
+ {% endif %} + {% endblock %} \ No newline at end of file diff --git a/auctions/templates/auctions/listing.html b/auctions/templates/auctions/listing.html index 4efb3b3..b9953ea 100644 --- a/auctions/templates/auctions/listing.html +++ b/auctions/templates/auctions/listing.html @@ -5,7 +5,7 @@

Listing : {{ Listing.title}}

- {% if user.username|stringformat:"s" == Listing.user|stringformat:"s" %} + {% if user.username|stringformat:"s" == Listing.user|stringformat:"s" and not Listing.closed %} Close this Listing {% endif %} diff --git a/db.sqlite3 b/db.sqlite3 index 3b1d679..85f9d99 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ