add form to product detail page
This commit is contained in:
parent
65b6465b40
commit
d423ab54de
|
@ -7,6 +7,5 @@ class CheckoutForm(forms.Form):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class AddToOrderForm(forms.Form):
|
class AddToOrderForm(forms.Form):
|
||||||
# no fields, just a submit button
|
quantity = forms.IntegerField()
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% load bootstrap3 %}
|
||||||
|
|
||||||
{% block content %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue