20 lines
566 B
Python
20 lines
566 B
Python
from django import forms
|
|
from django.forms import widgets
|
|
|
|
|
|
class CartItemForm(forms.Form):
|
|
"""
|
|
<input type="hidden" name="product" value="{{ product.pk }}">
|
|
<label for="quantity">{% translate 'Cantidad' %}</label>
|
|
<input id="quantity" type="number" name="quantity" value="1">
|
|
"""
|
|
|
|
product = forms.IntegerField(widget=widgets.HiddenInput)
|
|
quantity = forms.IntegerField()
|
|
|
|
|
|
class CreateOrderForm(forms.Form):
|
|
shipping_address = forms.IntegerField()
|
|
billing_address = forms.IntegerField()
|
|
shipping_method = forms.IntegerField()
|