add form to product detail page

This commit is contained in:
Thomas Steen Rasmussen 2016-05-14 19:20:47 +02:00
parent 65b6465b40
commit d423ab54de
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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 %}