You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
1.3 KiB
21 lines
1.3 KiB
from django import forms
|
|
|
|
class CartAddProductForm(forms.Form):
|
|
quantity = forms.CharField(widget=forms.TextInput(attrs={
|
|
'id': 'quantity',
|
|
'name': 'quantity',
|
|
'type': 'number',
|
|
'min': '1',
|
|
'max': '1000',
|
|
'value': '1',
|
|
'onchange': 'calculate()'}))
|
|
product_slug = forms.CharField(widget=forms.TextInput(attrs={
|
|
'id': 'product_slug',
|
|
'name': 'product_slug',
|
|
'type': 'hidden'}))
|
|
price_per_itom = forms.IntegerField(widget=forms.TextInput(attrs={
|
|
'id': 'price_per_itom',
|
|
'name': 'price_per_itom',
|
|
'type': 'hidden'}))
|
|
update = forms.BooleanField(required=False, initial=False, widget=forms.HiddenInput)
|
|
|
|
|