add form to product detail page
This commit is contained in:
parent
65b6465b40
commit
d423ab54de
|
@ -7,6 +7,5 @@ class CheckoutForm(forms.Form):
|
|||
pass
|
||||
|
||||
class AddToOrderForm(forms.Form):
|
||||
# no fields, just a submit button
|
||||
pass
|
||||
quantity = forms.IntegerField()
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
{% extends 'base.html' %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<b>details for product {{ product.id }}</b>
|
||||
<h2>{{ product.name }}</h2>
|
||||
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_button "Add to order" button_type="submit" button_class="btn-primary" %}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue