product upvote
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
<img src="{{ product.image.url }}" class="img-fluid" \>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a href=""><button class="btn btn-primary btn-lg btn-block"><span class="oi oi-caret-top"></span> Up Vote : {{ product.votes_total }}</button></a>
|
||||
<a href="javascript:{document.getElementById('upvote').submit()}"><button class="btn btn-primary btn-lg btn-block"><span class="oi oi-caret-top"></span> Up Vote : {{ product.votes_total }}</button></a>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
@ -37,4 +37,10 @@
|
||||
<p>{{ product.body }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="upvote" method="POST" action="{% url 'upvote' product.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden">
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user