final
This commit is contained in:
parent
a85a288278
commit
0f240692d2
@ -5,9 +5,9 @@
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
|
||||
<meta name="generator" content="Jekyll v3.8.6">
|
||||
<meta name="description" content="Product Hunt">
|
||||
<meta name="author" content="Sharad Ahlawat">
|
||||
<meta name="generator" content="django">
|
||||
<title>Product Hunt</title>
|
||||
|
||||
<link rel="canonical" href="https://getbootstrap.com/docs/4.4/examples/album/">
|
||||
|
@ -13,8 +13,7 @@
|
||||
<a href="{{ product.url }}"><h1>{{ product.title }}</h1></a>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="row pt-3">
|
||||
<div class="col-8">
|
||||
<img src="{{ product.image.url }}" class="img-fluid" \>
|
||||
</div>
|
||||
@ -25,17 +24,15 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="row pt-3">
|
||||
<div class="col-4">
|
||||
<h4>Hunted by: {{ product.hunter.username }}</h4>
|
||||
<h4><span class="oi oi-magnifying-glass"></span> Hunted by: {{ product.hunter.username }}</h4>
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<h4>{{ product.pubdate_pretty }}</h4>
|
||||
<h4><span class="oi oi-clock"></span> {{ product.pubdate_pretty }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="row pt-3">
|
||||
<div class="col-8">
|
||||
<p>{{ product.body }}</p>
|
||||
</div>
|
||||
|
@ -9,7 +9,7 @@ def home(request):
|
||||
return render(request, 'products/home.html', {'products': products})
|
||||
|
||||
|
||||
@login_required()
|
||||
@login_required(login_url='/accounts/signup')
|
||||
def create(request):
|
||||
if request.method == 'POST':
|
||||
if request.POST['title'] and request.POST['url'] and request.FILES['image'] and request.FILES['icon'] and \
|
||||
@ -38,7 +38,7 @@ def detail(request, product_id):
|
||||
return render(request, 'products/detail.html', {'product': product})
|
||||
|
||||
|
||||
@login_required()
|
||||
@login_required(login_url='/accounts/signup')
|
||||
def upvote(request, product_id):
|
||||
if request.method == 'POST':
|
||||
product = get_object_or_404(Product, pk=product_id)
|
||||
|
Loading…
Reference in New Issue
Block a user