Files
bbs/main/forms.py
T
nikolark fc400dffd4 Adds working deposit and purchases.
- Switch to bootstrap.
 - Still no balance checking or form feedback messages.
2012-02-22 05:22:04 +01:00

20 lines
472 B
Python

from django import forms
from models import *
class OrderForm(forms.ModelForm):
# TODO : validate that the customer can afford the order
class Meta:
model = Order
fields = ('customer',)
class OrderLineForm(forms.Form):
product = forms.IntegerField(required=True)
amount = forms.IntegerField(required=True)
unit_price = forms.FloatField(required=True)
class DepositForm(forms.ModelForm):
class Meta:
model = Transaction