add html screens

This commit is contained in:
Priyatham Sai Chand 2020-10-16 10:34:50 +05:30
parent 9cc4e8f240
commit fea1b1d125
6 changed files with 11 additions and 9 deletions

View File

@ -5,7 +5,7 @@
<div class="row">
{% for listing in Listings %}
<div class="col-sm-3">
<a href="" style = "color:inherit;text-decoration: none;">
<a href="{{ listing.title}}" style = "color:inherit;text-decoration: none;">
<div class="card" style="width: 18rem;">
<div class="shadow p-3 mb-5 bg-white rounded">
<img class="card-img-top" src="{{ listing.picture }}" alt="Preview not found">

View File

@ -1,16 +1,17 @@
{% extends "auctions/layout.html" %}
{% block body %}
<h2>Listing:{Listing.title}</h2>
<h2>Listing:{{ Listing.title}}</h2>
<img src = "{Listing.picture}"></img>
<img src = "{{Listing.picture}}"></img>
<p>{Listing.desc}</p>
<h3>${Listing.price}</h3>
<p>{{Listing.desc}}</p>
<h3>${{Listing.price}}</h3>
bids so far
<div class="form-group">
<input class="form-control" autofocus type="number" name="bid" placeholder="Bid">
</div>
<input class="btn btn-primary" type="submit" value="Create Listing">
<input class="btn btn-primary" type="submit" value="Place Bid">
{% endblock %}

View File

@ -9,5 +9,6 @@ urlpatterns = [
path("register", views.register, name="register"),
path("wishlist", views.register, name="wishlist"),
path("create", views.create, name="create"),
path("categories", views.register, name="categories")
path("categories", views.register, name="categories"),
path("<str:title>",views.listing,name="listing")
]

View File

@ -21,8 +21,8 @@ def listing(request,title):
"""
docstring
"""
listing = AuctionListing.objects.get(title)
return render(request,"acutions/listing.html",{
listing = AuctionListing.objects.get(pk = title)
return render(request,"auctions/listing.html",{
"Listing": listing
})